-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
FIX theming bugs #5787
FIX theming bugs #5787
Conversation
…nt flashing upon reloading
This pull request is automatically deployed with Now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Agreed that further refactoring into core/ui
etc probably makes sense
# Conflicts: # examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap
…e theme was getting lost ADD telejson as stringifier & parser for persistence CLEANUP state initialization CHANGE initial state for shortcuts so it's not dependent on this.getState() DEDUPLICATE merge util function FIX unnecessary messages about transition & brand missing in theme
Codecov Report
@@ Coverage Diff @@
## next #5787 +/- ##
========================================
- Coverage 34% 33.97% -0.03%
========================================
Files 651 651
Lines 9473 9465 -8
Branches 1345 1368 +23
========================================
- Hits 3221 3216 -5
+ Misses 5637 5635 -2
+ Partials 615 614 -1
Continue to review full report at Codecov.
|
@tmeasday Ended up having to introduce telejson in the persistence anyway, and had to up the maxDepth a bit for postMessage (not the entire theme was getting through) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided not to persistence this way.. open to changing it in the future but not at this stage of the release.
Ok with the rest of it, but if the issue was combining the theme defaults with the persisted theme, that should just be done the same way that e.g. versions does it. |
…inimal panelsize & maximum main size)
180ca78
to
9c5c780
Compare
REMOVE merge from initial state MOVE initial state of layout & ui to layout module ADD merge of initial, restored to layout module
9c5c780
to
7622f72
Compare
@tmeasday thanks for the comments, You're right, I changed it back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is OK but i have a couple of comments that we should probably discuss and resolve in future versions
lib/ui/src/core/addons.js
Outdated
selectedPanel: ensurePanel( | ||
api.getPanels(), | ||
store.getState().selectedPanel, | ||
store.getState().selectedPanel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit weerd (grabbing the selected panel twice). Is it intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, what's going on here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just followed the arguments of ensurePanel
,
I can remove 1 I think.
selectedPanel: options.panel || options.selectedPanel || selectedPanel, | ||
}, | ||
{ persistence: 'permanent' } | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we perma-persist all options, including the ones that were session-persisted above?
I'm OK with this for now for simplicity, but we might want to do something more subtle in the future (which will probably require improvements to the persistence API)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I briefly experimented with persisting all the layout & ui options, but decided to not increase the size of this PR even more.
But it was actually really nice, things like full-screen, nav, panelPosition being preserved over refreshes...
On my todo list after V5 launch.
Thanks for pulling the layout module out @ndelangen ! |
Issue: #5746
What I did
I fixed this a bit quick and dirty, Will cleanup after V5 release