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

ui: Create PopoverSelect, CatalogToolbar, and update tests #7489

Merged
merged 5 commits into from
May 11, 2020

Conversation

kaxcode
Copy link
Contributor

@kaxcode kaxcode commented Mar 24, 2020

  • Add rule to print 'ember/no-global-jquery' as a warning
  • Create tests for sorting services with CatalogToolbar
  • ui: Adds selectable-key-values helper (ui: Adds selectable-key-values helper #7472)
  • Create CatalogToolbar component and Styling
  • Create PopoverSelect component and styling

co-authored by: @johncowen

@kaxcode kaxcode added the theme/ui Anything related to the UI label Mar 24, 2020
@kaxcode kaxcode requested a review from a team March 24, 2020 14:18
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch 3 times, most recently from 748b49d to 377201a Compare March 25, 2020 14:32
@kaxcode kaxcode marked this pull request as ready for review March 25, 2020 14:45
Copy link
Contributor

@johncowen johncowen left a comment

Choose a reason for hiding this comment

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

Amazing 👏

I left one little nitpick comment, but it can always wait for another PR.

Oh actually, I just gave it a quick try and the sort menu should probably close when you change the sort. Have a look at #7479 you should see how to do it (that PR was essentially the same problem). Shout me if you can't figure it though.

My other thought should we make the sort button trigger the same height as the search box? And maybe see if we can move the popover-panel up a few pixels so its exactly underneath the trigger button when its open. I was just looking at the designs for this and those two things would make it spot on!

margin-top: 8px;
width: 16px;
height: 16px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if there's some stuff that could go in skin.scss here, maybe from line 57 down as that is all to do with the pipe and the icon, don't worry too much though we can always hit that in another spring clean PR, or decide when we next chat, its no biggie.

Oh wow I just saw what you did with the 103%, I'm guessing this is to do with making sure the top and bottom of the pipe meet up with the borders? I love the 103% btw, but I just has a thought that maybe a 'calc(100% + 3px)' might be better (if thats what this is for of course?)

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'll move those lines over to skin.scss.

calc(100% + 3px) is not the same as 103% so it extends too far down. The exact px match would be calc(100% + .5px). Which I think looks worse than the 103%. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update on the height. I had the sort matching the search before but I must have undone the change. Adding this change removes the need of a height: 103%.

Copy link
Contributor Author

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

@johncowen The changes in PR #7479 are at another level than the ones in PopoverSelect. I don't think I can work with the fake onchange event that was created to listen to an event listener, but we can talk about it more tomorrow.

@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch from 377201a to 8458aad Compare March 26, 2020 18:59
@kaxcode kaxcode requested a review from johncowen March 26, 2020 19:09
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch from 8458aad to 1187a36 Compare April 2, 2020 19:20
@johncowen johncowen force-pushed the ui-staging branch 2 times, most recently from dc39913 to cc0247c Compare April 8, 2020 10:00
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch 2 times, most recently from 3a0a724 to 00a518f Compare April 8, 2020 21:10
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch 2 times, most recently from ff1c139 to a188949 Compare April 24, 2020 20:21
@preetapan preetapan added this to the 1.8.0 milestone May 4, 2020
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch 2 times, most recently from b9a1cf2 to ae4e94a Compare May 5, 2020 21:30
kaxcode and others added 5 commits May 7, 2020 11:18
Preferably we want all copy/text to live in the template. Whilst you can
achieve what we've done here with a combination of different helpers, as
we will be using this approach in various places it's probably best to
make a helper.

We also hit an ember bug related to using the `let` helper and trying to
access `thingThatWasLet.firstObject` (which can also be worked around
using `object-at`).

Moving everything to a helper 'sorted' everything.

Probably worthwhile noting that if the sort option themselves become
dynamic, I'm not sure if the helper here would actually react as you
would expect (I'm aware that ember helpers on react on the root
arguments, not necesarily sub properties of those arguments). If we get
to that point this helper could take the same approach as what I believe
ember-composable-helpers does to get around this, or move them to the
view controller. If we do ever moved this to the view controller, we
can still use the exported function from the new helper here to keep
using the same functionality and tests we have here.
@kaxcode kaxcode force-pushed the ui/feature/create-popover-select branch from ae4e94a to a55ccb2 Compare May 7, 2020 15:54
@kaxcode
Copy link
Contributor Author

kaxcode commented May 11, 2020

Future PR needed to improve the performance by having the the sorting happen before the filtering.

Copy link
Contributor

@johncowen johncowen left a comment

Choose a reason for hiding this comment

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

:shipit: I love that we have this new dropdown menu component to use elsewhere ❤️

Agree we should sort before search here, but you're right we can add that in a later PR on top of this.

@kaxcode kaxcode merged commit 362298e into ui-staging May 11, 2020
@kaxcode kaxcode deleted the ui/feature/create-popover-select branch May 11, 2020 14:04
kaxcode added a commit that referenced this pull request May 11, 2020
* Create PopoverSelect component and styling

* Create CatalogToolbar component and Styling

* ui: Adds `selectable-key-values` helper (#7472)

Preferably we want all copy/text to live in the template. Whilst you can
achieve what we've done here with a combination of different helpers, as
we will be using this approach in various places it's probably best to
make a helper.

We also hit an ember bug related to using the `let` helper and trying to
access `thingThatWasLet.firstObject` (which can also be worked around
using `object-at`).

Moving everything to a helper 'sorted' everything.

Probably worthwhile noting that if the sort option themselves become
dynamic, I'm not sure if the helper here would actually react as you
would expect (I'm aware that ember helpers on react on the root
arguments, not necesarily sub properties of those arguments). If we get
to that point this helper could take the same approach as what I believe
ember-composable-helpers does to get around this, or move them to the
view controller. If we do ever moved this to the view controller, we
can still use the exported function from the new helper here to keep
using the same functionality and tests we have here.

* Create tests for sorting services with CatalogToolbar

* Add rule to print 'ember/no-global-jquery' as a warning

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
johncowen added a commit that referenced this pull request May 12, 2020
* Create PopoverSelect component and styling

* Create CatalogToolbar component and Styling

* ui: Adds `selectable-key-values` helper (#7472)

Preferably we want all copy/text to live in the template. Whilst you can
achieve what we've done here with a combination of different helpers, as
we will be using this approach in various places it's probably best to
make a helper.

We also hit an ember bug related to using the `let` helper and trying to
access `thingThatWasLet.firstObject` (which can also be worked around
using `object-at`).

Moving everything to a helper 'sorted' everything.

Probably worthwhile noting that if the sort option themselves become
dynamic, I'm not sure if the helper here would actually react as you
would expect (I'm aware that ember helpers on react on the root
arguments, not necesarily sub properties of those arguments). If we get
to that point this helper could take the same approach as what I believe
ember-composable-helpers does to get around this, or move them to the
view controller. If we do ever moved this to the view controller, we
can still use the exported function from the new helper here to keep
using the same functionality and tests we have here.

* Create tests for sorting services with CatalogToolbar

* Add rule to print 'ember/no-global-jquery' as a warning

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants