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

Add DropdownCustom component #285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

henckellbach
Copy link

@henckellbach henckellbach commented Oct 7, 2021

I decided to create a new dropdown component using custom designed options instead of the browser native <option>.
As the styles and logic differ quite a lot, I opted to make this a new component and not unify with the existing Dropdown.

Any feedback welcome 💪

New component
image

Actual OS
image


Possible Next Steps

  • better test coverage?
  • Storybook controls, actions?
  • rename Dropdown to Select and DropdownCustom to Dropdown?
  • utilize PropsWithHTMLAttributes across the codebase?

@ggdaltoso
Copy link
Member

Hi @henckellbach and thanks for your contribution!

Sorry for my late comment but I was investigating what is happening on our build workflow since CodeSandbox is showing errors

You are installing a dependency on @react95/core, which is completely fine, but it is conflicting with our @react95/gatsby-theme and I'm not 100% sure why.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ef3364c:

Sandbox Source
Vanilla Configuration

@ggdaltoso
Copy link
Member

There is two new commits in your branch fixing all building issues and we are ready to review it and discuss this new component!

@henckellbach
Copy link
Author

@ggdaltoso Awesome! This is my first contribution to this project so please feel free to point out any issues 🙂

@ggdaltoso ggdaltoso changed the title feat(core): add DropdownCustom component Add DropdownCustom component Oct 15, 2021
Copy link
Member

@ggdaltoso ggdaltoso left a comment

Choose a reason for hiding this comment

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

Everything looks amazing, @henckellbach !

Thanks for your contribution!

I just want to mention that you will need to add the import and the export of this component in components/intex.ts, to make this component available.

Comment on lines +102 to +106
width: 17px;
height: 17px;
font-size: 14px;
line-height: 1.1;
transform: translate(-3px, -2px);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
width: 17px;
height: 17px;
font-size: 14px;
line-height: 1.1;
transform: translate(-3px, -2px);
width: 18px;
height: 17px;
font-size: 14px;
line-height: 1.1;
transform: translate(-4px, -2px);

These changes will make our DropdownCustom pixel perfect with our Dropdown

import { th } from '@xstyled/system';
import { DropdownCustomProps } from './DropdownCustom';

import caret from './imgs/downcaret.png';
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to import the assets we already have in Dropdown component.

Maybe it makes senses to put your DropdownCustom in the same folder and take the advantage of sharing some styles too.

@ggdaltoso ggdaltoso added this to In progress in Roadmap via automation Oct 29, 2021
@ggdaltoso
Copy link
Member

Hey, @henckellbach!

Is it still interesting to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
In progress
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants