feat: Widget Configurator Revamp#7604
Open
Danziger wants to merge 131 commits into
Open
Conversation
…mize real state utilization
…idgetHooksListener
Contributor
Author
Contributor
Author
|
@fairlighteth regarding your comments:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This PR takes over #7261 and further refines the widget configurator.
It includes the following breaking changes for the widget SDKs (lib and react):
--dynamicHeightinstead ofiframe.style.height. UseiframeStyle.height: 'var(--dynamicHeight)'for auto-resize. A fixed height (e.g.640px) will not grow or shrink with content.iframeStyle: top-levelwidth,height, andmaxHeightare deprecated (still supported with warnings). With neither those noriframeStyle, the iframe no longer defaults to 450×640.boxShadow,widgetPadding, andwidgetBorderRadiusare removed. UseiframeStyle,bodyWrapperStyle, orcardStyleinstead.Features:
localStorage, not just the palettes. There's a button at the bottom of the sidebar to reset it.styleto set its height. Instead, if will set a CSS variable. Using it or not is the integrator's prerogative.appCodeand highlight that in the code snippet preview as well.baseUrlbased on widget configurator env, and offer some presets/shortcuts for local, dev and prod.Fixes (all from original PR):
Architecture / Performance:
BaseTextInputorSelectInput, to remove code duplication and enforce consistent look and feel and behaviour among them.Looks:
Form improvements:
I've moved any additional potential improvements/changes/ideas to https://linear.app/cowswap/issue/FE-153/widget-future-improvements to avoid blocking this PR.
Light:
Dark:
Video:
Video.Project.4.mp4
To Test
Background