Skip to content
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

Allow <Title /> to be nonConfigurable #9836

Open
wants to merge 8 commits into
base: next
Choose a base branch
from

Conversation

markyao6275
Copy link

@markyao6275 markyao6275 commented May 8, 2024

This addresses #8776

Testing:

Added storybook entry

Screenshot 2024-05-08 at 9 51 04 AM

@markyao6275
Copy link
Author

@fzaninotto @adguernier I believe this is ready for review again. Thanks!

@adguernier
Copy link
Contributor

adguernier commented May 22, 2024

Reviewed. Thanks for your work @markyao6275 👍

@markyao6275
Copy link
Author

Thanks for the comments @adguernier! Should be ready for another review :)

@adguernier
Copy link
Contributor

Aside from the last two comments, LGTM. Thanks for your work 💪

@djhi djhi self-requested a review May 23, 2024 09:13
Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think the default preferenceKey in Title should be the same as in PageTitleConfigurable and you should check if preferenceKey is strictly equal to false.

@markyao6275
Copy link
Author

@djhi you mean I should check if preferenceKey strictly equal to undefined right?

Anyway I tried to address your feedback in the most recent commit so please let me know if that's what you had in mind.

@djhi
Copy link
Contributor

djhi commented May 24, 2024

@djhi you mean I should check if preferenceKey strictly equal to undefined right?

I mean that to have it work like it did before, we should have a default preferenceKey set and users have to explicitly disable it by setting it to false. Hence, you should check if it is strictly equal to false to render the non configurable version. This is coherent with other part of react-admin.

@markyao6275
Copy link
Author

@djhi just acted on your feedback

For

I mean that to have it work like it did before, we should have a default preferenceKey

I just passed through the preferenceKey from <Title /> to <PageTitleConfigurable /> so that I don't have to specify the default ${pathname}.title in more than one place.

Let me know if there's anything else you'd like me to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants