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: make side panels resizable #738

Merged
merged 11 commits into from
Jun 14, 2023
Merged

Conversation

Kiruel
Copy link
Contributor

@Kiruel Kiruel commented Jun 9, 2023

Adding resize windows for widgetbook shell.

List of issues which are fixed by the PR

fix #621

Screenshots

If applicable, add screenshots to help explain the changes.

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.

@docs-page
Copy link

docs-page bot commented Jun 9, 2023

To view this pull requests documentation preview, visit the following URL:

docs.widgetbook.io/~738

Documentation is deployed and generated using docs.page.

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 work contributing to fix this! 🎉

Although this PR uses an external package, which is something we really not in fan of lately after removing most of our dependencies (bloc, provider, freezed, etc.). But I can see that the resizable_widget package:

  1. is somehow stable and doesn't get a lot of updates.
  2. is not commonly used by mobile app developers (the big percent of Flutter users), so it won't result in version conflicts.

@@ -17,8 +18,10 @@ class WidgetbookShell extends StatelessWidget {

return ColoredBox(
color: Theme.of(context).colorScheme.surface,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
child: ResizableWidget(
Copy link
Member

Choose a reason for hiding this comment

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

@Kiruel I modified this code a bit as follows:

  1. Sort children to be the last parameter for more readability.
  2. Remove Material widget; You probably ran into this issue because you've used the hosted version of widgetbook_core and not the local one. We use melos to manage dependencies, so consider using melos bs instead of flutter pub get in your future PRs.

@YoussefRaafatNasry YoussefRaafatNasry changed the title feat: resize windows feat: make side panels resizable Jun 12, 2023
@YoussefRaafatNasry YoussefRaafatNasry linked an issue Jun 12, 2023 that may be closed by this pull request
@YoussefRaafatNasry YoussefRaafatNasry enabled auto-merge (squash) June 12, 2023 13:32
@jenshor jenshor disabled auto-merge June 14, 2023 05:51
@jenshor jenshor merged commit a0e52f8 into widgetbook:main Jun 14, 2023
4 of 5 checks passed
@YoussefRaafatNasry YoussefRaafatNasry linked an issue Jun 16, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants