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

Make all tabs visible for a workflow #1931

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

coverbeck
Copy link
Contributor

@coverbeck coverbeck commented Feb 1, 2024

Description
Rolls back #1926, which reordered the tabs to make the Metrics tab visible without scrolling.

Instead make the tabs narrower, so they all fit, and no scrolling is required, per Steve's comment.

TLDR; restore original order of tabs on workflow component, tabs are now narrower to avoid scrolling.

Review Instructions

  1. Go to a workflow version with metrics
  2. Ensure all tabs are visible and the "scroll arrows" are not present.
  3. To make sure there's not a regression, do a browser refresh of the page when positioned on the metrics tab, and ensure the metrics tab is still the active tab.

What it looks like with the fix, full screen and minimum width screen:

Screen Shot 2024-02-01 at 2 57 46 PM Screen Shot 2024-02-01 at 2 56 44 PM

Issue
SEAB-6231

Security
If there are any concerns that require extra attention from the security team, highlight them here.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that your code compiles by running npm run build
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • If this is the first time you're submitting a PR or even if you just need a refresher, consider reviewing our style guide
  • Do not bypass Angular sanitization (bypassSecurityTrustHtml, etc.), or justify why you need to do so
  • If displaying markdown, use the markdown-wrapper component, which does extra sanitization
  • Do not use cookies, although this may change in the future
  • Run npm audit and ensure you are not introducing new vulnerabilities
  • Do due diligence on new 3rd party libraries, checking for CVEs
  • Don't allow user-uploaded images to be served from the Dockstore domain
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.
  • Check whether this PR disables tests. If it legitimately needs to disable a test, create a new ticket to re-enable it in a specific milestone.

@coverbeck coverbeck self-assigned this Feb 1, 2024
Copy link

sonarcloud bot commented Feb 1, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (959b372) 40.41% compared to head (27dd5aa) 40.43%.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/2.12.0    #1931      +/-   ##
==================================================
+ Coverage           40.41%   40.43%   +0.01%     
==================================================
  Files                 369      369              
  Lines               11493    11493              
  Branches             2948     2948              
==================================================
+ Hits                 4645     4647       +2     
+ Misses               4512     4510       -2     
  Partials             2336     2336              

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

@@ -537,10 +537,6 @@ describe('Dockstore my workflows part 3', () => {
cy.visit('/my-workflows/github.com/A/l');
isActiveTab('Info');
tabs.forEach((tab) => {
if (tab === 'Tools') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Part of revert commit to the way it was

@@ -23,3 +23,9 @@ a.underline-none {
width: 14rem;
text-align: start;
}

:host ::ng-deep .mat-tab-label {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change that makes the tabs narrower

@@ -374,10 +374,18 @@ <h3>
</ng-template>
</ng-template>
</mat-tab>
<mat-tab id="metricsTab" label="Metrics">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All changes in this file are a revert

@@ -6,7 +6,6 @@ describe('Dockstore Metrics', () => {
setTokenUserViewPort();
it('Should see no metrics banner', () => {
cy.visit('/workflows/github.com/A/l:master');
cy.get('.mat-tab-header-pagination-after').click();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pagination control no longer present, so don't click it. Applies to next to changes as well.

Copy link
Contributor

@svonworl svonworl left a comment

Choose a reason for hiding this comment

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

I have wanted this change for a long time. For people with smaller screens, or that use a narrower browser window, it is a big usability improvement. A little nerve-wracking to introduce it so close to the release date, but it'll probably be ok...


:host ::ng-deep .mat-tab-label {
padding-left: 0.5em !important;
padding-right: 0.5em !important;
Copy link
Contributor

@svonworl svonworl Feb 1, 2024

Choose a reason for hiding this comment

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

Initially, I thought it might make sense to increase the total minimum padding to a little more than 1em (0.5em + 0.5em). However, in the "super narrow screen" scenario, it's probably preferable to have the options jammed together, even though it's a tad ugly, rather than need to use a button to see them. So, this is good.

@coverbeck coverbeck merged commit b786d89 into release/2.12.0 Feb 2, 2024
19 checks passed
@coverbeck coverbeck deleted the feature/seab-6231/tabs branch February 2, 2024 17:26
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.

5 participants