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

fix: drop down gap #2007

Merged
merged 10 commits into from
May 17, 2024
Merged

fix: drop down gap #2007

merged 10 commits into from
May 17, 2024

Conversation

kwongz
Copy link
Contributor

@kwongz kwongz commented May 14, 2024

Description

Checklist

  • [ x] For UI or styling changes, I have added a screenshot or gif showing before & after
  • [ x] I have added a changeset
  • I have added to the docs where applicable
  • I have added to the VS Code extension where applicable

@kwongz kwongz self-assigned this May 14, 2024
Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: adf8b4c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@evidence-dev/components Patch
@evidence-dev/core-components Minor
@evidence-dev/evidence Major
my-evidence-project Patch
evidence-test-environment Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented May 14, 2024

Deploy Preview for next-docs-evidence ready!

Name Link
🔨 Latest commit adf8b4c
🔍 Latest deploy log https://app.netlify.com/sites/next-docs-evidence/deploys/6647a79586c14f0008eb6c60
😎 Deploy Preview https://deploy-preview-2007--next-docs-evidence.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 14, 2024

Deploy Preview for evidence-test-env ready!

Name Link
🔨 Latest commit adf8b4c
🔍 Latest deploy log https://app.netlify.com/sites/evidence-test-env/deploys/6647a795ea0f660008be64b2
😎 Deploy Preview https://deploy-preview-2007--evidence-test-env.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 14, 2024

Deploy Preview for evidence-development-workspace ready!

Name Link
🔨 Latest commit adf8b4c
🔍 Latest deploy log https://app.netlify.com/sites/evidence-development-workspace/deploys/6647a795be70b20008fd9377
😎 Deploy Preview https://deploy-preview-2007--evidence-development-workspace.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ItsMeBrianD ItsMeBrianD reopened this May 15, 2024
@mcrascal
Copy link
Member

@kwongz hitting the ground running, nice!

A couple things I noticed:

  1. Dropdown items can wrap to multiple lines. Right now, a dropdown with a wrapping item ends up a little cut off.
  2. Check the behaviour when searching, see gif. Ideally, all results would be visible, up to a height maximum, but right now the menu is shrinking below the size of the list.

@ItsMeBrianD feel free to weigh in also, but would it make sense to have the behaviour be something more like:

  1. More than [5] list items: we render the virtual list, and it has the same fixed height always.
  2. Less than [5] list items: we render a div, and we just let it fit its contents (e.g. no fixed height)?

I think that would cover the multi-line and search scenarios while also removing the gap.

CleanShot 2024-05-15 at 18 39 01@2x

CleanShot 2024-05-15 at 18 39 35

Copy link
Member

@mcrascal mcrascal left a comment

Choose a reason for hiding this comment

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

See comment

@kwongz
Copy link
Contributor Author

kwongz commented May 16, 2024

Thanks @mcrascal! Sound good, get working on this!

@kwongz
Copy link
Contributor Author

kwongz commented May 16, 2024

Added conditional rendering in the Dropdown.svelte file, Renders scroll-able Virtual List with 5 or more options

image

Dropdowns with less then 5 options will render DropdownOptionDisplay component with a regular div container to manage the height of the contents

Example 1. - 4 options with Line breaking

image

Example 2. - 2 options

image

Copy link
Member

Choose a reason for hiding this comment

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

I believe this should be gitignored

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Added the hashes.json to the gitignore, not too sure how it ended up there will speak to Brian about it tomorrow

Copy link
Member

@mcrascal mcrascal left a comment

Choose a reason for hiding this comment

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

Very excellent. No notes. One note.

@ItsMeBrianD ItsMeBrianD merged commit c651eea into next May 17, 2024
9 of 10 checks passed
@ItsMeBrianD ItsMeBrianD deleted the fix/1962-dropdowngap branch May 17, 2024 19:25
@mcrascal
Copy link
Member

@kwongz Massive!

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.

None yet

3 participants