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

#Vulcan-283/Dynamic browser tab titles. #613

Conversation

m-o-n-i-s-h
Copy link
Contributor

@m-o-n-i-s-h m-o-n-i-s-h commented Sep 4, 2023

Problem
Users finds difficult to navigate between browser tabs. If there are many dashboards opened.

Solution
Implemented a component which will dynamically change the browser tab title. For my users use case, we have used dashboard name.

tab title

NOTICE
The program was tested solely for our own use cases, which might differ from yours.

Author Info: Monish monish.nandakumaran@mercedes-benz.com on behalf of Mercedes-Benz Research and Development India
/~https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md

@m-o-n-i-s-h m-o-n-i-s-h changed the title Vulcan 283/Browser tab titlels Vulcan 283/Dynamic browser tab titles. Sep 4, 2023
@m-o-n-i-s-h m-o-n-i-s-h changed the title Vulcan 283/Dynamic browser tab titles. Vulcan-283/Dynamic browser tab titles. Sep 4, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (1a4bb4b) 46.26% compared to head (11be3fc) 46.28%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #613      +/-   ##
===========================================
+ Coverage    46.26%   46.28%   +0.02%     
===========================================
  Files          166      167       +1     
  Lines         6591     6594       +3     
  Branches      2040     2042       +2     
===========================================
+ Hits          3049     3052       +3     
  Misses        3501     3501              
  Partials        41       41              
Files Coverage Δ
src/component/page/PageHeader.tsx 100.00% <100.00%> (ø)
src/dashboard/header/DashboardTitle.tsx 58.33% <100.00%> (+0.88%) ⬆️
src/index.tsx 85.71% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m-o-n-i-s-h m-o-n-i-s-h changed the title Vulcan-283/Dynamic browser tab titles. #Vulcan-283/Dynamic browser tab titles. Sep 29, 2023
@nielsdejong nielsdejong added the 2.3 label Nov 2, 2023
@nielsdejong
Copy link
Collaborator

Hi @m-o-n-i-s-h ,
I think is a great feature and could potentially be useful to our users.
I'm wondering if it's possible to accomplish the same without the extra dependency on react-helmet-async.
Is there a reason you opted for the dependency as opposed to simple setting the document title before the dashboard title dispatch is called? e.g.

document.title = title; 
dispatch(setDashboardTitle(title));

Let me know what you think,
Niels

@nielsdejong nielsdejong removed the 2.4 label Nov 10, 2023
@m-o-n-i-s-h
Copy link
Contributor Author

Hi @nielsdejong ,

Yes it is possible to achieve the same without the dependency as you mentioned in your comments.

The reason why I opted react-helmet-async is we have custom favicon to be displayed (Which I have not included in this PR as it won't add any value to neodash in general) and in future for our usecase we may need to add meta description tag with dynamic content for SEO purpose.

If you think it will be an overkill. I would be happy to create a new PR with the simple implementation as you mentioned.

Kindly let me know.

Thank you,
Monish

@m-o-n-i-s-h
Copy link
Contributor Author

Created a new PR #708 #708

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.

2 participants