Skip to content

Enhancement/remove tab from doi landing page #1996 - #2014

Open
xkyue wants to merge 4 commits into
developfrom
enhancement/remove-tab-from-DOI-landing-page-#1996
Open

xkyue wants to merge 4 commits into
developfrom
enhancement/remove-tab-from-DOI-landing-page-#1996

Conversation

@xkyue

@xkyue xkyue commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Description
Remove visits tab from user defined DOI landing page & remove datafiles tab from session DOI landing page

Testing instructions

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking

closes #1996

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (2159076) to head (3e69e70).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2014   +/-   ##
========================================
  Coverage    96.70%   96.71%           
========================================
  Files          221      221           
  Lines        31626    31676   +50     
  Branches      4779     4786    +7     
========================================
+ Hits         30584    30635   +51     
  Misses        1037     1037           
+ Partials         5        4    -1     
Flag Coverage Δ
common 95.51% <ø> (+<0.01%) ⬆️
dataview 98.42% <100.00%> (+0.01%) ⬆️
download 96.87% <ø> (ø)
search 95.64% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xkyue
xkyue requested a review from louise-davies September 15, 2026 10:20

@louise-davies louise-davies left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mainly just need to account for version DOI landing pages as well :) and some minor style comments whilst I was requesting changes anyway

label={t('breadcrumbs.investigation_other')}
value="investigation"
/>
{doitype !== 'User-defined-concept' && (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This check is too narrow - if a user visits a version DOI landing page then they would see the investigation tab.

We can test for both user-defined types using !doiType.includes("User-defined")

);

const isSessionDOI = data?.type?.name === 'Investigation';
const doitype = data?.type?.name;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We're accessing data?.type?.name twice here, instead if we move the doitype definition before isSessionDOI, we can refactor isSessionDOI to use doitype instead of re-accessing data?.type?.name

Also, doitype should probably be camelCase so doiType

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.

Remove visits tab from user defined DOI landing page & remove datafiles tab from session DOI landing page

2 participants