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

DOCK-1525: reordering version dropdown in my workflow #1720

Merged
merged 21 commits into from
Mar 10, 2023

Conversation

hyunnaye
Copy link
Contributor

@hyunnaye hyunnaye commented Mar 2, 2023

Description
This PR adds a search feature onto the version dropdown in My Workflows and reorders the dropdown to alphabetical order.
Library used: https://www.npmjs.com/package/ngx-mat-select-search

Before change:
Screenshot from 2023-03-03 13-47-40

After change (search bar and alphabetical sorting):
Screenshot from 2023-03-08 16-19-50
Screenshot from 2023-03-08 16-19-58
Screenshot from 2023-03-08 16-20-22

Review Instructions
Review that the newly created integration test pass and the search feature correctly filters through the different versions of a workflow.

Issue
dockstore/dockstore#3722

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.

@hyunnaye hyunnaye self-assigned this Mar 2, 2023
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 6.25% and project coverage change: -0.19 ⚠️

Comparison is base (d515be7) 40.74% compared to head (19e0ed1) 40.56%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1720      +/-   ##
===========================================
- Coverage    40.74%   40.56%   -0.19%     
===========================================
  Files          349      349              
  Lines        10646    10676      +30     
  Branches      2728     2736       +8     
===========================================
- Hits          4338     4331       -7     
- Misses        4068     4103      +35     
- Partials      2240     2242       +2     
Impacted Files Coverage Δ
src/app/shared/modules/workflow.module.ts 42.85% <ø> (ø)
src/app/workflow/workflow.component.ts 2.65% <6.25%> (-0.23%) ⬇️

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@svonworl
Copy link
Contributor

svonworl commented Mar 7, 2023

Hi, Nayeon, thanks for the work on this. Could you please add a few comments at key spots in the code, it will help me to follow it.

Copy link
Collaborator

@coverbeck coverbeck left a comment

Choose a reason for hiding this comment

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

Looks cool!

Some observations about using the control, that you might be constrained by what customization the control allows:

  1. You have to click on the selection. For example, type develop, assuming there is a match; it only shows develop, but you then have to click on it. Could be just me, I try to use the mouse as little as possible.
  2. If you type a matching version, then press tab (no click), you end up in a state where it doesn't display anything. Screenshot attached.
  3. You could argue this both ways, but I don't like how it "remembers" your last search. I type develop, select it, now I want to look for master; it's still showing what I typed for develop beforehand.

Screen Shot 2023-03-07 at 11 24 05 AM

Copy link
Member

@denis-yuen denis-yuen left a comment

Choose a reason for hiding this comment

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

question

@@ -805,6 +805,7 @@
"make-fetch-happen@10.2.1","ISC","https://github.com/npm/make-fetch-happen"
"make-fetch-happen@5.0.2","ISC","https://github.com/zkat/make-fetch-happen"
"marked@4.2.3","MIT","https://github.com/markedjs/marked"
"mat-select-search@1.2.21","Custom: https://github.com/shafi-sahal/MatSelectSearch",""
Copy link
Member

@denis-yuen denis-yuen Mar 7, 2023

Choose a reason for hiding this comment

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

Was a big thread , didn't fully read through.
Did you consider https://github.com/bithost-gmbh/ngx-mat-select-search which seems to be more popular?
(this is a discussion, I know little about the two aside from seeing both in the thread and this one seems to have more commits/stars)

MIT License also a little more clearly open source than "custom"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried ngx-mat-select-search but I couldn't get it to compile due to various module errors like ERROR in ./node_modules/ngx-mat-select-search/fesm2020/ngx-mat-select-search.mjs 842:108-124 export 'MatIconButton' (imported as 'i4') was not found in '@angular/material/button' (possible exports: MatAnchor, MatButton, MatButtonModule)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, i'll try that out right now!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to ngx-mat-select-search as it seemed to resolve Charles' issues above

@hyunnaye hyunnaye removed request for kathy-t and svonworl March 8, 2023 19:30
@hyunnaye
Copy link
Contributor Author

hyunnaye commented Mar 8, 2023

Looks cool!

Some observations about using the control, that you might be constrained by what customization the control allows:

  1. You have to click on the selection. For example, type develop, assuming there is a match; it only shows develop, but you then have to click on it. Could be just me, I try to use the mouse as little as possible.
  2. If you type a matching version, then press tab (no click), you end up in a state where it doesn't display anything. Screenshot attached.
  3. You could argue this both ways, but I don't like how it "remembers" your last search. I type develop, select it, now I want to look for master; it's still showing what I typed for develop beforehand.

Screen Shot 2023-03-07 at 11 24 05 AM

Thank you for this! I switched over to ngx-mat-select-search following Denis' comment and it seems to resolve this issue. I will rerequest review after verifying all tests pass in my latest commit

Copy link
Member

@denis-yuen denis-yuen left a comment

Choose a reason for hiding this comment

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

Hmmm, so if I understand correctly, the build issues was the bad cache in the end?

@hyunnaye
Copy link
Contributor Author

hyunnaye commented Mar 9, 2023

Hmmm, so if I understand correctly, the build issues was the bad cache in the end?

Yea, I changed the version on package.json and package-lock.json and that seems to fix it.. Very odd

@denis-yuen
Copy link
Member

Hmmm, so if I understand correctly, the build issues was the bad cache in the end?

Yea, I changed the version on package.json and package-lock.json and that seems to fix it.. Very odd

I think what happened is the first time the cache was generated, it was messed up and every subsequent build it pulled the messed up cache until you busted the cache with the change

Copy link
Collaborator

@coverbeck coverbeck left a comment

Choose a reason for hiding this comment

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

I tried running it locally, and it looks and acts a lot nicer than the previous iteration. I did hve one question though that I left inline.

@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

@hyunnaye hyunnaye requested a review from coverbeck March 10, 2023 16:16
Copy link
Collaborator

@coverbeck coverbeck left a comment

Choose a reason for hiding this comment

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

I left a comment with one more question, but assuming that's resolved, approved.

@hyunnaye hyunnaye merged commit b8c2ba5 into develop Mar 10, 2023
@hyunnaye hyunnaye deleted the feature/DOCK-1525-version-dropdown branch March 10, 2023 19:43
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