Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn Template settings panel into a Template popover #41925
Turn Template settings panel into a Template popover #41925
Changes from 1 commit
8da899b
59d556c
0a0d5bd
bb675b3
bbc5b46
cb60fc9
1779f37
996090b
39de2ba
15797bf
216250b
224ae80
9e60699
90b06f0
1e18031
ff75b69
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work because of the missing backport (#38607 (comment)), but you can use the following snippet for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I was wondering what this was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be overkill for this, but there's a
useResourcePermissions
hook that makes this easier - #38785That also tells you if the entity can be edited when an id is provided. I notice you're using the 'create' permission for that at the moment. I don't know if there's any difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tip about
useResourcePermissions
. I think it's overkill here while we're only checkingcreate
.I didn't want to change any of the
PostTemplatePanel
logic as part of this PR. We only checkcreate
intrunk
so that's what I'm doing here. I'm not sure if we should checkedit
. Probably a good idea to investigate that separately.