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

Increase filters popover size and use full width in form components #352

Merged
merged 3 commits into from
Jul 20, 2021

Conversation

galangel
Copy link
Contributor

Signed-off-by: galangel gal0angel@gmail.com

Description

The change resizes the modal to 600 ( instead of 400 ) and uses the full-width prop in the form components to take advantage of the space.
also Removed the unused styles

Screen Shot 2021-05-13 at 15 05 18

Screen Shot 2021-05-13 at 15 05 35

Screen Shot 2021-05-13 at 15 04 35

I explicitly left the range input at false because I think it looks better like this than with full width
Screen Shot 2021-05-13 at 15 05 50

Fullscreen at 100%
Screen Shot 2021-05-13 at 15 04 12

Issues Resolved

Filters popover modal is too small

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

Signed-off-by: galangel <gal0angel@gmail.com>
@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 3bfe0c3

@seanneumann
Copy link
Contributor

I like this.

@kgcreative
Copy link
Member

+1

@ananzh
Copy link
Member

ananzh commented May 18, 2021

Unit test result:
Test Suites: 23 skipped, 1410 passed, 1410 of 1433 total
Tests: 256 skipped, 9 todo, 10341 passed, 10606 total
Snapshots: 2363 passed, 2363 total
Time: 43.678 s

Functional test result:
Screen Shot 2021-05-17 at 11 46 42 PM

@kavilla
Copy link
Member

kavilla commented May 18, 2021

Hey thanks for this! Tests pass for me. Desktop experience looks great!

But after talking with the team, I am worried about the mobile experience. As seen below, before and after on mobile. Even though Dashboards is intended to be a desktop experience, could there be improvements to make sure the text field isn't overflowing outside of the popover?

Before:
Screen Shot 2021-05-18 at 11 15 29 AM
Screen Shot 2021-05-18 at 11 15 42 AM

After:
Screen Shot 2021-05-18 at 11 28 50 AM
Screen Shot 2021-05-18 at 11 28 55 AM

@kavilla kavilla added the enhancement New feature or request label May 18, 2021
@kavilla kavilla linked an issue May 18, 2021 that may be closed by this pull request
@JacobBrandt
Copy link

For consistency, I would like to see screenshots 1, 3 and 4 have the same style rather than 4 be different for no reason. So since 1 and 3 are already the same why not make 4 the same style by adding a "Range" label above the range input and make range input full width.

@@ -294,7 +295,6 @@ class FilterEditorUI extends Component<Props, State> {
onChange={this.onFieldChange}
singleSelection={{ asPlainText: true }}
isClearable={false}
className="globalFilterEditor__fieldInput"

Choose a reason for hiding this comment

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

If you remove this class then the change you made to #355 is not going to work?

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, initially I used the subjects, now that I use the class, I Will revert this change in this PR

@@ -84,6 +84,7 @@ function RangeValueInputUI(props: Props) {
return (
<div>
<EuiFormControlLayoutDelimited
fullWidth={false}

Choose a reason for hiding this comment

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

As mentioned in my other comment I don't see why this value input is going to have a different style than phrases. I think instead you should change make this full width like you did the other input fields and change the aria-label below to just a normal 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.

Thank you so much for taking a look!

About the full-width for the range:
I did so because, In my opinion, it wasn't looking great. I added the full-width prop so for consistency.
But sure, I will make a change and update the photo. Tell me what you think after.

About the label:
sadly that's a prop from EUI

Choose a reason for hiding this comment

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

If we're trying to get the same style then you will have to use similar components. Meaning switch the EuiFormControlLayoutDelimited to EuiFormRow like the other value inputs.

@galangel
Copy link
Contributor Author

@kavilla Thank you for looking at this!
Didn't think about testing for mobile.
I Will check what can be done for the mobile experience and update the PR and any future PRs
Any guidelines for that? I assume we would like to support 400px min? (guessing from the current styling)

@kgcreative
Copy link
Member

Hi @galangel -I don't think i've done a deep dive in terms of what the EUI sizes are for mobile devices. I know their 's' breakpoint is at 575px, and based on 2020 usage data, the most common min size is 375px (360px for iPhone mini, but i'm not sure that's something we want to use as a benchmark) - My sense is that below the "s" breakpoint, things should just go edge to edge and stacked.

Signed-off-by: galangel <gal0angel@gmail.com>
@opensearch-ci-bot
Copy link
Collaborator

❌   DCO Check Failed ac57170
Run ./dev-tools/signoff-check.sh remotes/origin/main ac571707a32f1fd5ab176ffa40c3f80d96180885 to check locally
Use git commit with -s to add 'Signed-of-by: {EMAIL}' on impacted commits

@galangel
Copy link
Contributor Author

will now behave as in edit mode
May-31-2021 14-44-00

@galangel
Copy link
Contributor Author

@JacobBrandt can you re-review? I cant request in the UI =)

@galangel
Copy link
Contributor Author

@kavilla I have updated the width settings

@boktorbb
Copy link
Contributor

boktorbb commented Jun 3, 2021

@galangel The DCO checks are failing. It looks like the merge commit wasn't properly signed

@opensearch-ci-bot
Copy link
Collaborator

❌   DCO Check Failed 69d19d0
Run ./dev-tools/signoff-check.sh remotes/origin/main 69d19d01f09a5652c641d6c29fe8381535d28a3c to check locally
Use git commit with -s to add 'Signed-of-by: {EMAIL}' on impacted commits

@galangel
Copy link
Contributor Author

galangel commented Jun 6, 2021

@boktorbb-amzn can you help me with that? I'm not sure how to do it =)

@boktorbb
Copy link
Contributor

boktorbb commented Jun 8, 2021

Hey @galangel, it looks like your new commit is signed but the DCO check fails because your older commit commit d3bc49304becfe7e80b2592bda27130d44c2654f is still not signed. You can do an interactive rebase and just drop that commit since it's just a merge commit. You can also amend the commit and sign it and rebase.

Signed-off-by: galangel <gal0angel@gmail.com>
@galangel galangel force-pushed the larger-filters-popover-size branch from 69d19d0 to df0d7bb Compare June 20, 2021 10:02
@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed df0d7bb

@galangel
Copy link
Contributor Author

@boktorbb-amzn so I changed the commits, 🙏🏻 please review

Copy link
Contributor

@boktorbb boktorbb left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the contribution!

@galangel
Copy link
Contributor Author

Bumping =) @kavilla can you add your review so we could continue?

@JacobBrandt
Copy link

@galangel Just getting back from vacation. I'll test it out tonight.

@ananzh ananzh added the v1.1.0 label Jul 7, 2021
@kavilla kavilla merged commit 7604a49 into opensearch-project:main Jul 20, 2021
@kavilla
Copy link
Member

kavilla commented Jul 20, 2021

Sorry about the delay in merging this. Would you be able to create a backport PR into https://github.com/opensearch-project/OpenSearch-Dashboards/tree/1.x?

kavilla pushed a commit to kavilla/OpenSearch-Dashboards-1 that referenced this pull request Jul 26, 2021
…ents

* use full width
* Update width
* observer

Backport PR:
opensearch-project#352

Signed-off-by: galangel <gal0angel@gmail.com>
kavilla added a commit that referenced this pull request Jul 28, 2021
…ents (#672)

* use full width
* Update width
* observer

Backport PR:
#352

Signed-off-by: galangel <gal0angel@gmail.com>

Co-authored-by: Gal Angel <gal0angel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters popover modal is too small [BUG]
8 participants