-
Notifications
You must be signed in to change notification settings - Fork 7
Display import buttons for all registered subjects #166
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
Conversation
| // Pages get a specific button. | ||
| if ( subjectType === SubjectType.Page ) { | ||
| importButtons.push( { | ||
| text: `Import Pages`, | ||
| url: Screens.importPagesStart( session.id ), | ||
| } ); | ||
| return; | ||
| } |
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 is so that we maintain the behavior that was in place before this PR, which is that pages have a custom flow, where you manually import them one by one. I would like to not change this behavior in this PR, so that's why this code is here.
We can revisit this behavior in the future if we deem it necessary to change it.
|
|
||
| const schema = schemas[ subjectType ]; | ||
| importButtons.push( { | ||
| text: `Import ${ schema.title }s`, |
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.
I opted for keeping the plural like this, we can revisit this when we tackle #158.
ashfame
left a comment
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.
Looks good!
Fixes #155
There are no user-visible changes.