react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Allow <Title /> to be nonConfigurable

Open markyao6275 opened this issue 1 year ago • 6 comments

This addresses https://github.com/marmelab/react-admin/issues/8776

Testing:

Added storybook entry

Screenshot 2024-05-08 at 9 51 04 AM

markyao6275 avatar May 08 '24 01:05 markyao6275

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

markyao6275 avatar May 18 '24 00:05 markyao6275

Reviewed. Thanks for your work @markyao6275 :+1:

adguernier avatar May 22 '24 09:05 adguernier

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

markyao6275 avatar May 23 '24 01:05 markyao6275

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

adguernier avatar May 23 '24 09:05 adguernier

@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.

markyao6275 avatar May 23 '24 22:05 markyao6275

@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.

djhi avatar May 24 '24 06:05 djhi

@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.

markyao6275 avatar May 30 '24 04:05 markyao6275

@djhi friendly bump here

markyao6275 avatar Jun 11 '24 01:06 markyao6275

@djhi addressed, thanks!

markyao6275 avatar Jun 13 '24 02:06 markyao6275

@djhi friendly bump here

markyao6275 avatar Jun 27 '24 03:06 markyao6275

@slax57 addressed your comments, thanks!

markyao6275 avatar Jun 28 '24 12:06 markyao6275