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

fix: Tab doesn't represent the page you are on for non-data asset pages #9468

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

Salman-Apptware
Copy link
Collaborator

Checklist

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Dec 15, 2023
@@ -15,11 +16,13 @@ export default function AppProviders({ children }: Props) {
<AppConfigProvider>
<UserContextProvider>
<EntityRegistryProvider>
<BrowserTitleProvider>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Code styling: This component should be indented to match the others please!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will update it cause due to conflict

@@ -140,6 +164,9 @@ export const SearchablePage = ({ onSearch, onAutoComplete, children }: Props) =>
authenticatedUserPictureLink={user?.editableProperties?.pictureLink}
entityRegistry={entityRegistry}
/>
<Helmet>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need helmet here?

Ideally the Helmet is defined higher ups in the component hierarchy so that we can change the title for ANYWHERE inside the application

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Helmet is used in two places APP.tsx and EntityHead. In EntityHead other routes are not wrap and In App.tsx all routes are wrap but dynamicThemeConfig is added in json which is not in context that's the reason I have create new component

const { title, updateTitle } = useBrowserTitle();

useEffect(() => {
// Update the title only if it's not already set and there is a valid pathname
Copy link
Collaborator

Choose a reason for hiding this comment

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

@aseembansal-gogo Use case check:

What this code does is it splits the path of the URL itself to determine the title of the page.

For example this will do:

Dataset | Urn:li:sample:etc

For entity pages.

I don't think this is what we want. Please chime in with requirements clarifications.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

/settings/identities/users -> Settings | Identities | Users

@anshbansal anshbansal merged commit 16d3df6 into datahub-project:master Dec 20, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants