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

[Demo] Simplify demo titles #10461

Merged
merged 2 commits into from
Jan 23, 2025
Merged

[Demo] Simplify demo titles #10461

merged 2 commits into from
Jan 23, 2025

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jan 22, 2025

Problem

The demo introduced a custom usePageTitle hook that re-implemented logic already available in the different views contexts.

Solution

Simplify demo titles by using the views contexts.

How To Test

Open the demo then check each page still has its title and also have a translated browser tab title.

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@slax57 slax57 self-requested a review January 23, 2025 10:39

const pageTitle = translate('ra.page.edit', {
name: getResourceLabel('products', 1),
recordRepresentation: `"${record?.reference}"`,
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: you lost the wrapping with "

@slax57 slax57 merged commit 1c670ea into master Jan 23, 2025
16 checks passed
@slax57 slax57 deleted the simplify-demo-titles branch January 23, 2025 13:26
@slax57 slax57 changed the title Simplify demo titles [Demo] Simplify demo titles Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants