Skip to content

[Demo] Simplify demo titles#10461

Merged
slax57 merged 2 commits intomasterfrom
simplify-demo-titles
Jan 23, 2025
Merged

[Demo] Simplify demo titles#10461
slax57 merged 2 commits intomasterfrom
simplify-demo-titles

Conversation

@djhi
Copy link
Contributor

@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

Development

Successfully merging this pull request may close these issues.

3 participants