Skip to content

WIP Toolbar component and documentantion#781

Merged
dej611 merged 6 commits intoitalia:masterfrom
va-deem:toolbar-component
Nov 30, 2021
Merged

WIP Toolbar component and documentantion#781
dej611 merged 6 commits intoitalia:masterfrom
va-deem:toolbar-component

Conversation

@va-deem
Copy link
Copy Markdown
Contributor

@va-deem va-deem commented Nov 14, 2021

Fixes #

PR Checklist

  • My branch is up-to-date with the Upstream master branch.
  • The unit tests pass locally with my changes (if applicable).
  • I have added tests that prove my fix is effective or that my feature works (if applicable).
  • I have added necessary documentation (if appropriate).

Short description of what this resolves:

This is PR to add Toolbar component

Changes proposed in this Pull Request:

  • feat: adding toolbar component

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dip-trasformazione-digitale/design-react-kit/H44trU3V3vdmj7QaNXubp5iNia8r
✅ Preview: https://design-react-kit-git-fork-va-ce96ef-dip-trasformazione-digitale.vercel.app

@va-deem
Copy link
Copy Markdown
Contributor Author

va-deem commented Nov 14, 2021

Hello! I'd like to try to complete this task. I've opened a PR where I added basic component (in 3 sizes) and documentation. Please check if I'm doing right (this is the first time I doing that kind of stuff) and I will continue with it.
Thanks

Copy link
Copy Markdown
Member

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for your contribution!

This is already a great start! I've left some comments about improvements that can be done on the current codebase.
Do you mind add also add a ToolbarDividerItem component?

url,
srText,
iconName = 'it-comment',
isIconSmall,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To be honest I feel this one should come from the Toolbar context rather than as a prop. I cannot find an instance of icon-sm outside the small version of the toolbar. But do not worry for now, will think about it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I feel so. If we add class 'toolbar-small' to Toolbar component, icons in ToolbarItem should be small too. That was my first intention but I couldn't find the way to do it for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don’t worry for now, it can be a follow up of this PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meanwhile, can you remove it and set it to false internally where used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed, but now the ToolbarItem component lacks the 'small' size. In the EsempioSmall the icons are exactly the same size as they are in Esempio or EsempioMedium.

@va-deem
Copy link
Copy Markdown
Contributor Author

va-deem commented Nov 18, 2021

tada Thanks for your contribution!

This is already a great start! I've left some comments about improvements that can be done on the current codebase. Do you mind add also add a ToolbarDividerItem component?

Thanks, that was my first commit to open source. :) I don't mind to add ToolbarDividerItem, of course.
I've added some tests to both components.
Will continue with them

@dej611
Copy link
Copy Markdown
Member

dej611 commented Nov 25, 2021

Checked the CI error and it’s just new snapshots not been added.

You can do this on your machine and upload the new file:

yarn test -u

That should fix it

Copy link
Copy Markdown
Member

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

The PR looks good. 🚀

If you can address only last few feedback I'd say it's ready to merge 👍

url,
srText,
iconName = 'it-comment',
isIconSmall,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meanwhile, can you remove it and set it to false internally where used?

@va-deem
Copy link
Copy Markdown
Contributor Author

va-deem commented Nov 27, 2021

Checked the CI error and it’s just new snapshots not been added.

You can do this on your machine and upload the new file:

yarn test -u

That should fix it

I would suggest adding it to the 'How to contribute' section as a necessary step

Copy link
Copy Markdown
Member

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

All good! 🎉

Thanks for your contribution!

@dej611 dej611 merged commit 3b8133d into italia:master Nov 30, 2021
@dej611 dej611 mentioned this pull request Dec 15, 2021
3 tasks
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.

2 participants