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

Bugfix/hide empty tab #4969

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nelliney
Copy link
Contributor

@Nelliney Nelliney commented Aug 20, 2024

Fixing the bug: in the patient view, when selecting the 'Files and Links' tab and navigating through patients, an empty tab was shown for those without data (see link). This fix ensures that the 'Files & Links' tab will display "There are no results" for patients who don't have any data.

Before the fix:

Screenshot 2024-08-20 at 17 11 41

Screenshot 2024-08-19 at 18 49 03

After the fix:

Screenshot 2024-08-20 at 17 11 22

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit fb4854d
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/66c53f7e2c67110008237516
😎 Deploy Preview https://deploy-preview-4969--cbioportalfrontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Nelliney Nelliney requested review from alisman and inodb and removed request for alisman August 20, 2024 02:18
Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

@Nelliney @alisman is one option to do something like this:

if (resourceURL) {
  if (resourceDataExists) {
    // show data in tab
  } else {
    // show tab and show text "No {tabName} for this patient". 
  }
} else {
 if (resourceDataExists) {
     // show tab
 } else {
    // hide tab
 }
} 

I.e. show a message when in the URL the tab is explicitly requested, but hide the tab in other scenarios. It currently feels a bit odd that it jumps back to the "Summary View" when the patient does not have the requested tab

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