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

feat: add grid addon #943

Merged
merged 9 commits into from
Oct 9, 2023

Conversation

Mastersam07
Copy link
Contributor

@Mastersam07 Mastersam07 commented Oct 6, 2023

Add grid addon.

This addon draws a grid on the widgetbook canvas. Where there is a DeviceFrameAddon, the grid is drawn on the device frame.

Seems like a good approximation of #17. Fields added to specify horizontal and vertical grid spacing.

Usage

To use grid on device, the DeviceFrameAddon must come before GridAddon in the addons hierarchy.

addons: [
        DeviceFrameAddon(devices: Devices.ios.all),
        GridAddon(),
      ],

List of issues which are fixed by the PR

#17

Screenrecord

Grid on widgetbook canvas

grid.mp4

Grid on device frame

device_grid.mp4

Checklist

  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making].
  • All existing and new tests are passing.

If you need help, consider asking for advice on Discord.

@Mastersam07 Mastersam07 changed the title Draft: grid addon feat grid addon Oct 6, 2023
@Mastersam07 Mastersam07 marked this pull request as ready for review October 6, 2023 22:33
@Mastersam07
Copy link
Contributor Author

Hi @YoussefRaafatNasry can you please take a look/review? This depends partly on #942

@Mastersam07 Mastersam07 changed the title feat grid addon feat: grid addon Oct 6, 2023
@YoussefRaafatNasry YoussefRaafatNasry linked an issue Oct 8, 2023 that may be closed by this pull request
Copy link
Member

@YoussefRaafatNasry YoussefRaafatNasry left a comment

Choose a reason for hiding this comment

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

With the changes requested, we can detach this PR from the int knob PR, so we can merge each once separately.

Let me know what you think about the proposed changes and if you have any better ideas to improve this.

@Mastersam07
Copy link
Contributor Author

@YoussefRaafatNasry changes made accordingly.

@Mastersam07
Copy link
Contributor Author

@YoussefRaafatNasry changes made.

Copy link
Member

@YoussefRaafatNasry YoussefRaafatNasry left a comment

Choose a reason for hiding this comment

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

Great job @Mastersam07! Keep it up with the awesome PRs 💙

There will be some trivial changes (style, rewording in docs/Changelog) that I will do before merging this. The reason I will be doing them instead of adding comments is because:

  1. They are nit-picks that you should not bother with, and focus more on your other PRs.
  2. We have a lot of Hacktoberfest activity going on, and I am trying to minimize the back and forth on PRs.

I would still advice that you have a look on them, and feel free to ask any question them if needed.

@YoussefRaafatNasry YoussefRaafatNasry changed the title feat: grid addon feat: add grid addon Oct 9, 2023
@YoussefRaafatNasry YoussefRaafatNasry merged commit b07e25c into widgetbook:main Oct 9, 2023
5 checks passed
@Mastersam07 Mastersam07 deleted the feat/grid-addon branch October 9, 2023 12:02
@Mastersam07
Copy link
Contributor Author

Great job @Mastersam07! Keep it up with the awesome PRs 💙

There will be some trivial changes (style, rewording in docs/Changelog) that I will do before merging this. The reason I will be doing them instead of adding comments is because:

  1. They are nit-picks that you should not bother with, and focus more on your other PRs.
  2. We have a lot of Hacktoberfest activity going on, and I am trying to minimize the back and forth on PRs.

I would still advice that you have a look on them, and feel free to ask any question them if needed.

Alright. Went through the changes, pretty straightforward. No questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid Addon
2 participants