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: Return original document title when leaving a dashboard #16323

Merged
merged 4 commits into from
Aug 24, 2021
Merged

fix: Return original document title when leaving a dashboard #16323

merged 4 commits into from
Aug 24, 2021

Conversation

geido
Copy link
Member

@geido geido commented Aug 18, 2021

SUMMARY

This PR replaces the document title back to the original one when leaving the dashboard. This is to make sure that the dashboard title does not remain in the browser tab while moving to different pages without reloading.

This is not a definitive solution but a quick fix for the problem reported in #16254. As we move toward eliminating page reloads, the need for a title management implementation arises. In fact, the titles are currently only managed server-side, with the Dashboard page being the only exception.

BEFORE

before_title_change.mp4

AFTER

after_title_change.mp4

TESTING INSTRUCTIONS

  1. Go to the Dashboards' list
  2. Open a Dashboard and observe the browser tab title
  3. Go back to the Dashboards' list and make sure the browser tab title has changed

ADDITIONAL INFORMATION

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Tested, works nicely! 1 small nit about naming, but not blocking

@codecov
Copy link

codecov bot commented Aug 18, 2021

Codecov Report

Merging #16323 (5b3b32a) into master (970d762) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 5b3b32a differs from pull request most recent head 58d16d5. Consider uploading reports for the commit 58d16d5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16323      +/-   ##
==========================================
- Coverage   76.64%   76.63%   -0.01%     
==========================================
  Files        1000     1000              
  Lines       53489    53492       +3     
  Branches     6816     6816              
==========================================
  Hits        40996    40996              
- Misses      12257    12260       +3     
  Partials      236      236              
Flag Coverage Δ
javascript 70.87% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rontend/src/dashboard/containers/DashboardPage.tsx 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 970d762...58d16d5. Read the comment docs.

@geido
Copy link
Member Author

geido commented Aug 18, 2021

/testenv up

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://18.237.109.74:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder if we should start using document titles more to make it easier to distinguish between tab contents?

@geido
Copy link
Member Author

geido commented Aug 24, 2021

LGTM. I wonder if we should start using document titles more to make it easier to distinguish between tab contents?

We should definitely look into this

@geido geido merged commit 9a37ad1 into apache:master Aug 24, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@geido geido deleted the fix/issue_16254_tab_title branch August 26, 2021 10:29
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…16323)

* Return original title on unmount

* Name var originalDocumentTitle
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…16323)

* Return original title on unmount

* Name var originalDocumentTitle
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
@daphn3k
Copy link

daphn3k commented Dec 5, 2024

LGTM. I wonder if we should start using document titles more to make it easier to distinguish between tab contents?

I know this is a while ago, but was this ever picked up/is planned? I couldn't find something from my search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] page title does not change back after navigating away from dashboard
5 participants