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

use dropdown for checkin history period #6702

Merged
merged 4 commits into from
Apr 21, 2022
Merged

Conversation

rishichawda
Copy link
Member

@rishichawda rishichawda commented Feb 15, 2022

Signed-off-by: rishichawda rishichawda@users.noreply.github.com

🔩 Description: What code changed, and why?

The Check-in history in node details on /desktop dashboard has a toggle for switching between the periods which looks like a dropdown. Updated it to be a dropdown as intended. Along with that, there are a couple of minor changes to the same container to be semantically make more sense (main wrapper (the "heading component" is now a flex box, dropdown isn't fixed width, both drop downs are wrapped in their own space rather than just thrown in into the main container)

⛓️ Related Resources

resolve #6207

👍 Definition of Done

👟 How to Build and Test the Change

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

The updated UI component

updated-select-dropdown-color

Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Feb 15, 2022

✔️ Deploy Preview for chef-automate ready!

🔨 Explore the source changes: e8e7964

🔍 Inspect the deploy log: https://app.netlify.com/sites/chef-automate/deploys/621378490945230007e8a2c6

😎 Browse the preview: https://deploy-preview-6702--chef-automate.netlify.app

Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
@rishichawda rishichawda force-pushed the fix-dropdown-on-check-in-history branch from e871b73 to 8baaa6f Compare February 16, 2022 09:54
@rishichawda rishichawda requested review from a team February 16, 2022 10:53
<chef-dropdown class='download' [visible]="downloadDropdownVisible">
<div class="checkin-select">
<chef-button secondary (click)="toggleCheckInPeriodDropdown()" class='download-dropdown-toggle'>
<span>Last {{ (checkInNumDays === twoWeekNumDays ? 2 : 4) }} Weeks</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can shift this to the component.
(checkInNumDays === twoWeekNumDays ? 2 : 4)

Copy link
Member Author

@rishichawda rishichawda Feb 16, 2022

Choose a reason for hiding this comment

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

Yeah I thought so too at first when I looked at the code, but conditionally rendering the text here seems better than calling a function that wraps the same logic. So I let it be untouched.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK

Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
@rishichawda
Copy link
Member Author

Updated the dropdown's hover and selected state colors based on input from ux team.

updated-select-dropdown-color

@sonarcloud
Copy link

sonarcloud bot commented Feb 21, 2022

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

@kalroy kalroy merged commit 01185cd into main Apr 21, 2022
@kalroy kalroy deleted the fix-dropdown-on-check-in-history branch April 21, 2022 04:57
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.

misleading ui element in desktop dashboard
4 participants