-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make nav components more atomic #2
Conversation
…ordPress#21075) * Extract Navigation Link block rendering from Navigation Move code around with TODOs where needed Migrate away from block.json Filter out empty blocks Minor tweaks Add navigation link to core dynamic block types Temporarily comment out code in nav-link block that is coupled to nav block Minor fixes Actually render the inner blocks This is probably fine Render nav link inner blocks in a <ul> Make the Show Submenu Icon feature work using CSS Ensure default attributes work correctly on nav and nav link blocks Fix has-submenu-icon classname application in render function Make color styles inherit Move navigation link styles to the navigation link style.scss Fix & being used in base level style Remove TODO that has now been TODONE Fix PHP linting Update navigation link snapshot test Fix PHP doc block comments Co-Authored-By: Robert Anderson <[email protected]> * Render navigation-link from block.json * Migrate some navigation-link styles from navigation * Fix copy/pasted function name * Navigation: Use render_callback instead of render_block hook * Navigation: Use block context when rendering a Link * Navigation: Remove core/ prefix from context attribute names * Navigation: Remove .has-submenu-icon * Navigation: Fix failing integration test * Navigation: Fix submenu icon appearance Co-authored-by: Robert Anderson <[email protected]>
* Retire $radius-round-rectangle * Retire dark-gray-900 * Retire dark-gray-800 * Rename new colors to be on a scale. * Rename a variable, retire blue medium 100. * Retire light-gray-100 * Make all grays neutral. * Retire light-gray-200 * Retire light-gray-300. * Replace light-gray-400 * Retire light gray 500, update borders.
…ing applied to dragged block (WordPress#23638) * Fix invisible drop target indicator caused by is-drop-target class being applied to dragged block * Update tests * Update comment
Co-authored-by: Riad Benguella <[email protected]>
* add pullquote tranformations This will be refactored. * leave raw transformation to be handled by Quote only * fix e2e tests * merge quote/pullquote tranforms from list
…ordPress#23439) * Throw error if we have an issue registering blocks. * Remove empty newline. * Try out more error handling. * Add typerror. * Slight refactor. * Add `isInstallable` property to disable the Add button on blocks with fatal errors * Update the copy of error messages * Remove variable abbreviation. * Move the state shape from action to reducer. * Fix broken tests. * Fix typo in test. * Fix margin bottom for content. Co-authored-by: Kelly Dwan <[email protected]>
…3654) * Update with review suggestions * Text edits, linting, and typos - Add shell language - Add block.json info about properties * Update with review suggestions * Package lock update
) Co-authored-by: Ella van Durpe <[email protected]>
Co-authored-by: Enrique Sánchez <[email protected]>
* Release: WordPress 5.5 beta 1 finishing touches * Add patterns ticket * Update client-assets.php Co-authored-by: Riad Benguella <[email protected]>
WordPress#23600) * Add "engines" to the package.json and "engine-strict = true" to the .npmrc * Add "npm": ">=6.9.0" to npm-engines * Change engines: node to >=10.0.0 according to check-engines * Remove obsolete npm-scripts which check engines
* Scripts: Fix build script with style.css files * Docs: Add entry to `@wordpress/scripts` changelog file
…ipt (WordPress#23711) * Scripts: Exclude node_modules from source map processing in build scripts * Docs: Add note in @wordpress/scripts changelog about fix
…WordPress#22668) * Add inline styles for font-sizes in the editor * Fix subscription * Avoid new BlockListBlock instance Co-authored-by: Ella van Durpe <[email protected]>
Co-authored-by: Carolina Nymark <[email protected]>
…#23688) * Block Directory: Return inactive plugins with block directory results * Active a an inactive block plugin if we see a plugin URL The plugin URL will only exist if the plugin is already installed, so we can use that to activate that plugin. We can also use this link for uninstallation, so we make sure to add it into the block object when installing a plugin. * Add links to mocked plugin response * Fix mocked test data * Fix notice in install test
* Mobile - Buttons block - Use same logic to insert blocks as the inserter menu * Correct EmptyListComponent to avoid empty space after cutting block Co-authored-by: lukewalczak <[email protected]>
…ings. (WordPress#24080) * update block.json * add textAlign in editor * update wront context check / warnings * allow comment html (links) to render in editor * link colors to work in editor * link colors to register on front end * remove check for postType * update editor rendering of comments
* Updates content and style, also adds a description * Update test snapshot
* Release script: Update react-native-editor version to 1.33.0 * Update release notes. * Update version numbers for packages. * Revert "Reduce spacing between label and slider control (WordPress#23580)" (WordPress#24109) This reverts commit 2a67de0. Co-authored-by: Antonis Lilis <[email protected]>
* Updates content and style, also adds a description * Increase viewportWidth for better preview * Add missing newline character
* Updates content and style, also adds a description * Fix double quotes error
* i18n: Merge similar translation strings in rss block Moved from https://core.trac.wordpress.org/ticket/50739 * Add translation comment
* Updates contents and style, also adds a description * Fix double arrow aligments * Remove duplicate lines
* Updates content and style, also adds a description * Remove unnecessary double quotes
* Adds 'Heading and paragraph' pattern * Update layout of chapter and heading. Also description to reflect the change. * Fix code spacing issues
* Add a description and icon to the Post Tags block
* Add a description to the Post Title block. * Added postTitle icon
* Updates content, style and title, also adds a description * Update gradient starting color * Update contents of pattern and changed filename, title and description accordingly * Fix double quotes issue
* Initial working tree display * add styles * add styles * dark theme * back button * secondary * BEM style classnames * remove back button styles * add menu: 'primary' data propery * get even more working * remove extra styles * add README * manifest
Lots of good things happening here. I also happened to remove state in WordPress#24255, but happy to go with this one if it makes sense. Could you fork Gutenberg and create a new PR on the Gutenberg repo so its visible? The |
d602b75
to
3444b29
Compare
PR opened at WordPress#24266 |
Size Change: -21 B (0%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
Description
Breaks down nav components into smaller pieces so that the nav itself is more customizable.
This is in need of testing and there are still some outstanding issues with accessibility, but prefer to handle these in follow-ups to keep the scope of this PR down.
This PR tries to strike a balance between flexibility and ease of use. I think in keeping this component as presentational as possible, it would be ideal to have the consumer map over and use navigational components directly:
instead of passing an array of items:
However, using the former option means putting more responsibility on the consumer to filter the array of items. Open to feedback here and whether or not there's a way to improve this.
Screenshots
Testing
npm run storybook:dev
Navigation
component.