Skip to content

Conversation

DmitiryPotychkin
Copy link
Contributor

Description

  • Change navigation buttons size, border color, arrows icon
  • Change select popup size and position

Previous:
Screenshot from 2021-01-19 13-11-43

Now:
Screenshot from 2021-01-19 13-11-06

@DmitiryPotychkin DmitiryPotychkin requested a review from a team as a code owner January 19, 2021 11:13
@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #512 (402ce14) into main (96ec23a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #512   +/-   ##
=======================================
  Coverage   85.36%   85.36%           
=======================================
  Files         763      763           
  Lines       15673    15674    +1     
  Branches     1991     1991           
=======================================
+ Hits        13379    13380    +1     
  Misses       2261     2261           
  Partials       33       33           
Impacted Files Coverage Δ
...ts/components/src/paginator/paginator.component.ts 95.08% <ø> (ø)
projects/components/src/select/select.component.ts 94.00% <ø> (ø)
...jects/components/src/paginator/paginator.module.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96ec23a...402ce14. Read the comment docs.

.small-square {
height: 32px;
width: 32px;
min-width: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it only different from small class by width and min-width? Can we achieve the same result with the small class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After implementing the-toggle-button-group instead of ht-button I removed all changes in button component and defined styles for pagination buttons in parent component

public highlightSelected: boolean = true;

@Input()
public type?: SelectType;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of introducing a new input, can the component set the width of the popover content dynamically to match the width of its trigger element? This would be useful at few other location.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree about not introducing a new input, but I would actually think set the width based on the width of the options provided - why make it wider than the widest option (with some max-width) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now popover content of select has min-width equal to width of trigger element. Example how it look not in pagination component.
Previous:
not-improved-select

Current:
improved-select

If option in popover wider than trigger element:
long-option

display: flex;
margin: 0 24px 0 12px;
::ng-deep {
.toggle-button-group {
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess all of this is required because the paginator toggle has a slightly different style that toggle button component. @jake-bassett What should we do for this inconsistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

this is way too much reskinning IMO - there's a ton of class dependencies here that could easily change. I get that we sometimes need ng-deep, but at this point, I think using toggle is more likely to introduce breakages in the future and would rather either make the paginator style consistent with toggle or not use toggle in this component and implement the buttons as part of this component.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on not reusing a component if we need to modify it so heavily.

Copy link
Contributor

Choose a reason for hiding this comment

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

aah. I kind of suggested to use toggle since the behavior was similar. I didn't know the styling of pagination buttons is so different. Should we instead look into combining the two styles form ux side?

Copy link
Contributor

@jake-bassett jake-bassett Jan 26, 2021

Choose a reason for hiding this comment

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

Yeah, I can see the draw of using the toggle, but the use cases are just a little different. Pagination is really two buttons visually tied together, but functionally independent. Toggles have one or more active states, possibly with the state of one button influencing the other buttons.

display: flex;
margin: 0 24px 0 12px;
::ng-deep {
.toggle-button-group {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is way too much reskinning IMO - there's a ton of class dependencies here that could easily change. I get that we sometimes need ng-deep, but at this point, I think using toggle is more likely to introduce breakages in the future and would rather either make the paginator style consistent with toggle or not use toggle in this component and implement the buttons as part of this component.

aaron-steinfeld
aaron-steinfeld previously approved these changes Feb 2, 2021
aaron-steinfeld
aaron-steinfeld previously approved these changes Feb 2, 2021
anandtiwary
anandtiwary previously approved these changes Feb 2, 2021
*ngSwitchCase="'${SelectTriggerDisplayMode.Icon}'"
class="trigger-content icon-only"
[ngClass]="this.selected !== undefined ? 'selected' : ''"
#triggerContainer
Copy link
Contributor

Choose a reason for hiding this comment

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

this is insane the triggerContainer on 48. Should it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, forgot to remove. Fixed now

@anandtiwary anandtiwary merged commit 6175c39 into hypertrace:main Feb 2, 2021
@github-actions
Copy link

github-actions bot commented Feb 2, 2021

Unit Test Results

    4 files  ±0  233 suites  ±0   15m 34s ⏱️ + 2m 8s
831 tests ±0  831 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
835 runs  ±0  835 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 6175c39. ± Comparison against base commit 96ec23a.

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.

4 participants