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

ensure extended settings is hidden when user hides settings sidebar #2972

Closed
wants to merge 4 commits into from
Closed

ensure extended settings is hidden when user hides settings sidebar #2972

wants to merge 4 commits into from

Conversation

shaunsantacruz
Copy link
Contributor

@shaunsantacruz shaunsantacruz commented Oct 11, 2017

Description

Hides the extended settings if the user hides the settings sidebar. Attempts to fix #2849

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@shaunsantacruz
Copy link
Contributor Author

My first pr :)

Apparently I really need to run tests before I submit a pr. I'll look into the the failing tests...

@gziolo
Copy link
Member

gziolo commented Oct 11, 2017

My first pr :)

Awesome, thanks for on working this issue 👍

You can run tests locally using npm test. It will do the linting and run unit tests. You can also run tests only by typing npm run test-unit.

Travis complains because there are some differences between your code and WordPress code style. One of the unit tests fails because it no longer works with the reducer change you introduced. You can see details here or locally by using the aforementioned commands. It looks like those are mostly tabs vs spaces issues and your editor doesn't support .editorconfig file. On the good side, it all should be easy to fix :)

If you have more question don't hesitate to ask :)

gziolo
gziolo previously requested changes Oct 11, 2017
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Marking as need changes.

@codecov
Copy link

codecov bot commented Oct 11, 2017

Codecov Report

Merging #2972 into master will decrease coverage by 0.01%.
The diff coverage is 13.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2972      +/-   ##
==========================================
- Coverage   33.33%   33.32%   -0.02%     
==========================================
  Files         197      197              
  Lines        5789     5798       +9     
  Branches     1027     1029       +2     
==========================================
+ Hits         1930     1932       +2     
- Misses       3254     3259       +5     
- Partials      605      607       +2
Impacted Files Coverage Δ
editor/store-defaults.js 100% <ø> (ø) ⬆️
editor/actions.js 34.14% <0%> (-0.86%) ⬇️
editor/meta-boxes/index.js 0% <0%> (ø) ⬆️
editor/selectors.js 94.04% <0%> (-0.57%) ⬇️
editor/reducer.js 87.66% <100%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2328828...0e9a903. Read the comment docs.

@aduth
Copy link
Member

aduth commented Oct 12, 2017

Just noting that I left some of my own thoughts at #2849 (comment) about whether we'd really want this behavior.

@@ -815,7 +815,7 @@ describe( 'state', () => {
it( 'should apply all defaults', () => {
const state = preferences( undefined, {} );

expect( state ).toEqual( { blockUsage: {}, recentlyUsedBlocks: [], mode: 'visual', isSidebarOpened: true, panels: { 'post-status': true } } );
expect( state ).toEqual( { blockUsage: {}, recentlyUsedBlocks: [], mode: 'visual', isSidebarOpened: true, isExtendedSettingsOpened: true, panels: { 'post-status': true } } );
} );
Copy link
Member

Choose a reason for hiding this comment

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

Can we add 2 tests that verify changes applied to the reducer when TOGGLE_EXTENDED_SETTINGS action is triggered? It would be very similar to the existing tests for TOGGLE_SIDEBAR_PANEL action.

@gziolo gziolo dismissed their stale review October 13, 2017 07:12

Eslint and tests error resolved :)

@johnbillion
Copy link
Member

This was fixed in #3065.

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.

Extended settings visible when settings are hidden
4 participants