-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Insert @username
for user mention autocomplete
#4444
Conversation
Rather than inserting a static link and the display name, both of which may change over time and lead to stale content, follow the pattern of existing user mentions in WordPress projects and insert a plaintext mention using the username.
Avoids a syntax error and may come in handy.
Since this no longer inserts a link, it should be usable in any kind of node.
I don't really know why there are some Travis failures (it might be happening to everybody?) but this is now working. My understanding is that |
@helen There are two ESLint errors: autocompleters/index.js
121:22 error 'textNode' is defined but never used no-unused-vars
126:16 error Unknown property 'class' found, use 'className' instead react/no-unknown-property It's severely obfuscated both locally and in the CI jobs amongst those JSDoc warnings, I'll update and/or create a new issue to address this |
This doesn't play nicely with TinyMCE, unfortunately. There are a couple of bugs I've noticed:
Also, the
@azaozz: Do you know how we can avoid these issues? |
This caused problems where TinyMCE would not delete the empty span and you would essentially be stuck inside it forever after and never know without looking at the HTML.
@pento Nice catch on the span issue. I wonder if it has to do with TinyMCE retaining spans with a class name - I have a vague recollection of their removal being a common complaint during the spread of icon fonts. I've pushed a commit that just removes the wrapping span, which is not really necessary anyway, was more like a nice-to-have/me not being able to figure out that I needed parens. Hoping to get this into the next release so we can deploy this on an internal site and start finding even more bugs :) |
Nice, looks good to me! |
Squashed commit of the following: commit 4e0358e Merge: 5f6e8c6 73612cb Author: Joen Asmussen <[email protected]> Date: Tue Jan 23 11:19:02 2018 +0100 Merge pull request #4631 from WordPress/try/new-mover-icons Try smaller up/down arrows, and focus management commit 73612cb Author: Joen Asmussen <[email protected]> Date: Tue Jan 23 10:28:59 2018 +0100 Adjust test to not look for the icon The icon is now an SVG passed on commit 5f6e8c6 Author: Herb Miller <[email protected]> Date: Tue Jan 23 04:06:21 2018 +0000 Fixes #4541 (#1) (#4542) * Fixes #4541 (#1) * Update ISSUE_TEMPLATE.md commit 25d90ca Author: Stephen Edgar <[email protected]> Date: Mon Jan 22 11:26:46 2018 +1100 Scrips: Update verbiage and comments in `install-node-nvm.sh` script (#4624) commit 456f28a Author: Andrew Duthie <[email protected]> Date: Sat Jan 20 17:13:37 2018 -0500 Components: Ensure isLoading set to false after request error (#4525) commit 5760b63 Author: Ramon <[email protected]> Date: Sat Jan 20 19:33:25 2018 -0200 Update "Edit Link" to "Insert/edit link" (#4471) commit d967017 Merge: 62a9e7b 9da45da Author: Miguel Fonseca <[email protected]> Date: Fri Jan 19 18:36:35 2018 +0000 Merge pull request #4349 from WordPress/fix/3839-undelayed-slot-prop-update fix/3839: Move slot.forceUpdate() to fill's render to fix prop propagation commit 9da45da Author: James Johnson <[email protected]> Date: Mon Jan 8 16:40:09 2018 +1000 Move slot.forceUpdate() call into componentWillUpdate - Fixes prop propagation across Slot boundary. commit 62a9e7b Author: Andrew Duthie <[email protected]> Date: Fri Jan 19 12:27:40 2018 -0500 Block List: Select block only if not already selected (#4586) commit 8d57578 Author: Andrew Duthie <[email protected]> Date: Fri Jan 19 12:24:29 2018 -0500 Block List: Start multi-selection tracking on mousemove (#4585) * Block List: Start multi-selection tracking on mousemove * State: Abort state update if multi-select action has no effect commit d591e58 Author: Ella Van Dorpe <[email protected]> Date: Fri Jan 19 18:00:06 2018 +0100 Add subhead block (#2091) commit 3568fc4 Author: Jorge <[email protected]> Date: Fri Jan 19 16:37:09 2018 +0000 Added text align feature to cover image. (#4066) commit 6dd01de Author: Riad Benguella <[email protected]> Date: Fri Jan 19 14:41:36 2018 +0100 MetaBoxes: Remove dirty-checking metaboxes state (#4184) * MetaBoxes: Remove dirty-checking metaboxes state * MetaBoxes: compare meta boxes HTML while leaving the editor to warn about unsaved changes * Meta Boxes: Changing the way we save metaboxes Hidden metaboxes (side) were not saved before commit 036f60a Author: Riad Benguella <[email protected]> Date: Fri Jan 19 14:34:17 2018 +0100 Blocks: Showing a preview of the block immediately after drag and drop (#4567) commit 060200c Merge: df24fd0 0e6fb4b Author: Miguel Fonseca <[email protected]> Date: Fri Jan 19 11:35:24 2018 +0000 Merge pull request #4549 from WordPress/add/copy-content-as-extension Refactor CopyContentButton as core extension commit df24fd0 Author: Ella Van Dorpe <[email protected]> Date: Fri Jan 19 11:57:40 2018 +0100 Add HTML handler to dropzone (#4577) * Add HTML handler to dropzone * Add HTML handler to image placeholder * Merge ifs commit 993561d Author: mac <[email protected]> Date: Thu Jan 18 09:29:19 2018 -0700 Image Block Link Label Copy Change commit 5ab37b7 Author: Ella Van Dorpe <[email protected]> Date: Fri Jan 19 11:12:51 2018 +0100 Remove "Open in new window" link option (#4583) Reverts #2628. commit 6ed1573 Author: Grzegorz (Greg) Ziółkowski <[email protected]> Date: Fri Jan 19 09:49:04 2018 +0100 Docs: Update title for the scaffolding blocks document (#4596) commit 91cb16c Author: Joen Asmussen <[email protected]> Date: Fri Jan 19 09:47:32 2018 +0100 Try new icons for movers These icons are smaller and less obtrusive, which makes them less heavy to look at. This PR also employs a workaround to achieve the effect that `:focusring` would, were it implemented (see https://www.youtube.com/watch?v=ilj2P5-5CjI). This is applied only to the mover icons. GIF: https://cldup.com/5lyhf0iSTp.gif commit f43140e Author: Riad Benguella <[email protected]> Date: Fri Jan 19 09:44:04 2018 +0100 Block versioning: Introduce a migration function (#3673) commit aa5e157 Author: Jason Caldwell <[email protected]> Date: Mon Jan 15 03:28:47 2018 -0900 Improve `useOnce` documentation. #3695 commit 85be4c7 Author: Gary Pendergast <[email protected]> Date: Fri Jan 19 14:40:26 2018 +1100 Use docker-compose for all Docker commands (#4592) commit a2d64e1 Author: Andrew Duthie <[email protected]> Date: Thu Jan 18 12:52:56 2018 -0500 Block: Move drag handling to instance-bound handler (#4582) commit 0e6fb4b Author: Miguel Fonseca <[email protected]> Date: Wed Jan 17 15:18:28 2018 +0000 Refactor CopyContentButton as core extension * Use withState & compose, drop class component * Cache CopyContentButton element for EditorActions filter commit 6c256dd Author: Jorge <[email protected]> Date: Tue Jan 16 21:00:01 2018 +0000 Don't persist mobile and publish sidebar to localStorage. Mobile and publish sidebars should when page reloads, even if they were open before. commit 4d6af27 Author: Jorge <[email protected]> Date: Tue Jan 16 20:58:46 2018 +0000 Implemented mechanism to allow reducers to customise what information gets serialised to localStorage; Changed mechanism to load defaults in loadAndPersist. commit 1fa9344 Author: Jorge <[email protected]> Date: Tue Jan 16 20:43:27 2018 +0000 Removed old mechanism to avoid mobile sidebar persistence. With the last code changes this mechanism is not being used anymore. commit e24460c Author: Grzegorz (Greg) Ziółkowski <[email protected]> Date: Thu Jan 18 12:37:14 2018 +0100 Docs: Add page explaining how to scaffold blocks (#4404) commit b866d21 Merge: 57280d0 d04b78d Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 12:01:35 2018 +0100 Merge pull request #3996 from WordPress/try/gallery-markup-tweaks Try new gallery markup commit 57280d0 Merge: e97b65f eb954da Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 21:41:59 2018 +1100 Merge pull request #4563 from WordPress/update/eslint-jsdoc JSDoc fixes commit d04b78d Author: Riad Benguella <[email protected]> Date: Thu Jan 18 11:38:04 2018 +0100 Gallery Block: Fix tests commit 91b2504 Author: Riad Benguella <[email protected]> Date: Thu Jan 18 11:26:34 2018 +0100 Gallery Block: Fix deprecated version commit 450f716 Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 11:15:01 2018 +0100 Try adjusting deprecated attributes Also re-add the deprecated CSS class. commit e97b65f Merge: f9486f1 5d50586 Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 11:13:11 2018 +0100 Merge pull request #4512 from WordPress/try/new-focus-outlines Try new button outline & focus styles commit 5d50586 Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 10:59:27 2018 +0100 Tweak styles further from revert. commit eb954da Merge: 968e87f 48780ab Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 20:55:46 2018 +1100 Merge branch 'update/eslint-jsdoc' of github.com:WordPress/gutenberg into update/eslint-jsdoc commit 968e87f Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 20:54:39 2018 +1100 More JSDoc fixes commit 1cea78d Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 10:53:27 2018 +0100 Revert tabindex fix, and reverse active & hover states. commit 48780ab Merge: 596ff36 f9486f1 Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 20:24:59 2018 +1100 Merge branch 'master' into update/eslint-jsdoc commit 3da0798 Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 09:49:39 2018 +0100 Replace all instances of blocks-gallery-image commit 4466445 Author: Joen Asmussen <[email protected]> Date: Thu Jan 18 09:29:05 2018 +0100 Address feedback - Move li outside of component - Fix CSS typo - Add deprecated section commit d8eaefb Author: Joen Asmussen <[email protected]> Date: Thu Dec 14 09:56:47 2017 +0100 Try new gallery markup This is a new version of the PR by #3441 by @samikeijonen. It's just basically "rebased". It seems to be working fine in practice, the chief purpose is to make the gallery be list based. I'm getting "modified externally" warnings, though. commit f9486f1 Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 19:23:33 2018 +1100 chore: remove `eslines` (#4565) * chore: remove `eslines` * chore: remove `eslines` from `eslint` npm script * chore: remove JSON formatter from `eslint` npm script commit e9f38ae Author: Grzegorz (Greg) Ziółkowski <[email protected]> Date: Thu Jan 18 09:12:51 2018 +0100 Components: Force update when new filter added or removed when using withFilters HOC (#4428) commit cda269d Author: jaswrks <[email protected]> Date: Wed Jan 17 22:48:30 2018 -0900 Remove danger warning from plugin header (#4552) see: #4185 commit 596ff36 Author: Stephen Edgar <[email protected]> Date: Thu Jan 18 18:46:05 2018 +1100 JSDoc fixes commit e826be5 Author: Lara Schenck <[email protected]> Date: Wed Jan 17 23:33:35 2018 -0800 Add more context to Templates sample code (#4557) * Add function and add_action call to sample code * Better function name commit b8566d7 Merge: 64b6017 c442f0e Author: Robert Anderson <[email protected]> Date: Thu Jan 18 09:52:08 2018 +1100 Merge pull request #4497 from WordPress/update/move-logic-out-of-inserter Move data logic out of the inserter commit c442f0e Author: Robert Anderson <[email protected]> Date: Wed Jan 17 16:33:23 2018 +1100 Add a unique id to inserter items This lets the inserter do faster string comparison between inserter items rather than deep object comparison. commit 6759f55 Author: Robert Anderson <[email protected]> Date: Tue Jan 16 13:00:54 2018 +1100 Move data logic out of the inserter Moves the logic that determines which items should appear in the inserter into dedicated selector functions. This way, the logic is easier to test and can be re-used. commit 64b6017 Author: Ella Van Dorpe <[email protected]> Date: Wed Jan 17 17:18:25 2018 +0100 Ensure editor still exists after timeout (#4524) * Ensure editor still exists after timeout * Add doc for setSafeTimeout commit 0940478 Author: Ella Van Dorpe <[email protected]> Date: Wed Jan 17 15:24:32 2018 +0100 Allow copying text in block (non input) (#4531) commit 79e9552 Merge: add336f d129a6c Author: Joen Asmussen <[email protected]> Date: Wed Jan 17 12:51:28 2018 +0100 Merge pull request #4313 from WordPress/fix/blinking-focus-outline Fix issue where black rectangle would briefly blink on new paragraphs commit add336f Author: Riad Benguella <[email protected]> Date: Wed Jan 17 12:23:31 2018 +0100 Data Module: Expose state using selectors (#4105) commit 47c36a5 Author: Riad Benguella <[email protected]> Date: Fri Jan 12 14:41:18 2018 +0100 Meta Boxes: Allow collapsing/sorting the meta boxes panels commit 8d3a673 Author: Josh Pollock <[email protected]> Date: Sat Jan 13 15:30:08 2018 -0500 Add links to specific sections of Redux docs #4452 commit 6e2e944 Author: Robert Anderson <[email protected]> Date: Wed Jan 17 18:28:48 2018 +1100 Only minimize -rtl files in production (#4536) This improves incremental developmnet build performance by about 3.5x! commit 9d28bac Merge: acd3d22 d216fe1 Author: Robert Anderson <[email protected]> Date: Wed Jan 17 16:59:04 2018 +1100 Merge pull request #4538 from WordPress/fix/snapshot-tests Fix snapshot tests commit d216fe1 Author: Robert Anderson <[email protected]> Date: Wed Jan 17 16:51:01 2018 +1100 Fix snapshot tests commit acd3d22 Author: Walter Ebert <[email protected]> Date: Wed Jan 17 04:24:52 2018 +0100 Remove Vine embed (#4521) Vine is no longer a supported oembed provider since WordPress 4.9.0, it can be removed from Gutenberg to match. commit c433d76 Author: Gary Pendergast <[email protected]> Date: Wed Jan 17 13:54:24 2018 +1100 Improve the build scripts (#4465) There's a bunch of stuff that can be automated when setting up a local development environment. Here's some polish, etc. Notable changes: - Automatically check for and install NVM, update to the correct version of Node. - Add some extra information to Docker checks. - Add a check and fix for npm/npm#16938, which is super annoying. - Switch to using Docker for Composer scripts. - Defining the WordPress URL port in docker-compose.yml now defines it everywhere, including Cypress e2e tests. - Generally clean up and hide the spammy status messages that don't benefit anyone. - Add a welcome message at the end of the setup process. commit 7f7b607 Author: Helen Hou-Sandi <[email protected]> Date: Tue Jan 16 17:44:57 2018 -0500 Insert `@username` for user mention autocomplete (#4444) Rather than inserting a static link and the display name, both of which may change over time and lead to stale content, follow the pattern of existing user mentions in WordPress projects and insert a plaintext mention using the username. commit 2e276ad Author: Thorsten Frommen <[email protected]> Date: Tue Jan 16 22:27:50 2018 +0100 Simplify control flow. (#4458) commit 8cad9ae Author: Thorsten Frommen <[email protected]> Date: Tue Jan 16 22:25:59 2018 +0100 Remove stray word. (#4459) commit fdd1568 Author: Sören Wrede <[email protected]> Date: Tue Jan 16 22:04:58 2018 +0100 Remove colon from audio and video block placeholder. (#4431) commit 75d81e9 Author: Andrew Duthie <[email protected]> Date: Tue Jan 16 14:53:00 2018 -0500 Blocks: Reduce sibling inserter initial height (#4384) commit 3e08d83 Author: Riad Benguella <[email protected]> Date: Tue Jan 16 13:35:21 2018 +0100 Media: Refactor the MediaUploadButton to be agnostic to its rendered UI commit 8e87182 Author: Jason Caldwell <[email protected]> Date: Mon Jan 15 04:32:21 2018 -0900 fix: `applyOrUnset()` consistency. See: #3859 commit 8f0aab9 Author: Riad Benguella <[email protected]> Date: Tue Jan 16 14:30:50 2018 +0100 Documentation: change default post type term commit b86cbe2 Author: Riad Benguella <[email protected]> Date: Tue Jan 16 14:14:44 2018 +0100 Documentation: Clarifies how to assign a template to a default Post Type commit 513534d Author: Sören Wrede <[email protected]> Date: Tue Jan 16 14:19:33 2018 +0100 Update copyright year to 2018 in license.md (#4511) commit 14f76e5 Author: Jb Audras <[email protected]> Date: Tue Jan 16 14:01:42 2018 +0100 Add missing alt attribute to image (and gallery) blocks when alt return an empty value (#4363) commit 789f955 Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 13:10:34 2018 +0100 Polish focus styles further commit 6c65025 Merge: 64a4cf7 8a12860 Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 12:39:20 2018 +0100 Merge pull request #4508 from WordPress/update/theme-progress-bar Update theme progress color bar to match theme commit 64a4cf7 Author: Stephen Edgar <[email protected]> Date: Tue Jan 16 22:36:00 2018 +1100 Remove ESLint JSDoc checks, for now (#4510) commit 8a12860 Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 12:01:15 2018 +0100 Update theme progress color bar to match theme This makes it so the animated updater matches the WordPress admin color scheme. commit 030dec3 Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 11:38:58 2018 +0100 Fix focus issue with SVGs commit adbdbb7 Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 11:35:57 2018 +0100 Try a different approach for styling movers commit db533fa Author: Joen Asmussen <[email protected]> Date: Tue Jan 16 11:12:39 2018 +0100 Try new focus styles commit f4fb4ad Author: Grzegorz (Greg) Ziółkowski <[email protected]> Date: Tue Jan 16 08:59:59 2018 +0100 Blocks: Add regression check for block edit using snapshot testing (#4399) commit 34930ca Merge: af74fa6 35b8e04 Author: Anton Timmermans <[email protected]> Date: Tue Jan 16 08:14:03 2018 +0100 Merge pull request #4493 from WordPress/update/jsdoc-returns-follow-up docs: add preceding line break and remove superfluous spacing in JSDoc `@returns` descriptions commit 35b8e04 Author: Stephen Edgar <[email protected]> Date: Tue Jan 16 09:34:20 2018 +1100 docs: add preceding line break and remove superfluous spacing in JSDoc `@returns` descriptions commit af74fa6 Merge: 3f54b38 a6b45ad Author: Robert Anderson <[email protected]> Date: Tue Jan 16 09:20:47 2018 +1100 Merge pull request #4395 from WordPress/fix/trigger-typing-mode-on-enter Trigger typing mode when ENTER is pressed commit 3f54b38 Author: Jorge <[email protected]> Date: Mon Jan 15 17:24:48 2018 +0000 Fixed erros when adding duplicate tags/flat terms. (#4487) If we get an error saying we have a duplicate tag/flat term (tag may have been added by other used since last time we fetched), we search the server for the new tag and we add it to our list. commit 2bdab14 Author: Tammie Lister <[email protected]> Date: Mon Jan 15 11:56:20 2018 +0000 Added in thrijith as contributor commit 79bb46e Author: Thrijith Thankachan <[email protected]> Date: Mon Jan 15 17:24:31 2018 +0530 Video Block: Change block description (#4448) commit ea36aa5 Author: Stephen Edgar <[email protected]> Date: Mon Jan 15 19:51:14 2018 +1100 chore: add `cypress.env.json` to `.gitignore` (#4466) commit a418f56 Merge: eb468a8 a2e070a Author: Joen Asmussen <[email protected]> Date: Mon Jan 15 09:21:44 2018 +0100 Merge pull request #4462 from rileybrook/update/conributing.md-workflow Update workflow steps in CONTRIBUTING.md documentation commit eb468a8 Author: Stephen Edgar <[email protected]> Date: Mon Jan 15 19:21:07 2018 +1100 chore: remove unused `react-markdown` npm module (#4461) commit 1e81e41 Author: Stephen Edgar <[email protected]> Date: Mon Jan 15 19:20:37 2018 +1100 docs: use `@returns` over `@return` JSDoc tag (#4464) Fixes per WordPress JavaScript Inline Coding Standards: • Use `@returns` over `@return` JSDoc tag fixing ESLint `jsdoc/check-tag-names` "Invalid JSDoc tag" warnings • Ensures there is a blank new line before the `@returns` JSDoc tag • Ensures the `@returns` JSDoc tag description ends with a period. See https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ commit a6b45ad Author: Robert Anderson <[email protected]> Date: Fri Jan 12 12:01:43 2018 +1100 Trigger typing mode when BACKSPACE is pressed commit 394c89b Author: Robert Anderson <[email protected]> Date: Thu Jan 11 15:50:22 2018 +1100 Trigger typing mode when ENTER is pressed Splitting a block or inserting a new paragraph block by pressing ENTER should engage typing mode. commit a2e070a Author: mac <[email protected]> Date: Sun Jan 14 19:41:18 2018 -0700 Update workflow steps in contributing.md documentation commit 38300ff Merge: 8ee2b1a 5d4e19d Author: Robert Anderson <[email protected]> Date: Mon Jan 15 10:53:43 2018 +1100 Merge pull request #4304 from WordPress/fix/content-sanitization Enable TinyMCE sanitization when setting HTML content commit 8ee2b1a Author: Gary Pendergast <[email protected]> Date: Mon Jan 15 09:04:18 2018 +1100 Force wp-api.js (via Backbone settings) to use HTTP/1.0 methods only. (#4396) commit 9fe1ddc Author: Gary Pendergast <[email protected]> Date: Mon Jan 15 09:00:10 2018 +1100 Build Tools: Add support for docker-compose.override.yml (#4457) As we don't actually use the `docker` directory to contain anything, the `docker-compose.yml` file has also been moved to the root directory. This tidies up a bunch of commands that used to have to refer to the special file location. commit ae9b07f Author: iseulde <[email protected]> Date: Fri Jan 12 17:16:05 2018 +0100 Remove BR logic from list block commit 8ac6cc8 Author: Riley Brook <[email protected]> Date: Fri Jan 12 09:37:26 2018 -0700 Size to Level (#4440) Changes copy from "Size" to Level" displayed within Heading block settings. commit 440d278 Merge: 66303b3 f0b7447 Author: Miguel Fonseca <[email protected]> Date: Fri Jan 12 13:32:04 2018 +0100 Merge pull request #4429 from WordPress/fix/gutenberg-activation-undefined-constant-warning Fix warning plugin activation commit f0b7447 Author: Miguel Fonseca <[email protected]> Date: Fri Jan 12 13:27:14 2018 +0100 Fix warning plugin activation Guard against undefined constant GUTENBERG_DEVELOPMENT_MODE. commit 66303b3 Author: Ella Van Dorpe <[email protected]> Date: Fri Jan 12 13:12:39 2018 +0100 Image: set width if aligned but unresized (#4356) commit cd7aa52 Author: Robert Anderson <[email protected]> Date: Fri Jan 12 23:09:18 2018 +1100 Fix the Custom Color button from appearing flat (#4392) This is a regression caused by #3958. commit 4d1ad21 Author: Matias Ventura <[email protected]> Date: Fri Jan 12 12:47:03 2018 +0100 Increase version to 2.0.0. (#4424) commit e495f6e Merge: d937d3a e81ab0a Author: Miguel Fonseca <[email protected]> Date: Fri Jan 12 12:16:25 2018 +0100 Merge pull request #4323 from WordPress/update/copy-from-ellipsis Ellipsis: Add button to copy entire document commit d937d3a Author: Riad Benguella <[email protected]> Date: Thu Jan 11 15:44:41 2018 +0100 Blocks: Style the "footer" in quotes to ensure backwards compatibility commit e81ab0a Author: Miguel Fonseca <[email protected]> Date: Thu Jan 4 19:58:52 2018 +0000 Ellipsis: Add button to copy entire document * Scrap `copyAll` shenanigan, use ClipboardButton * ClipboardButton: Accept additional onFinishCopy callback * Add component EditorActions below ModeSwitcher * Don't close menu on copy, show "Copied!" instead * MenuItems: Make it more reusable * Allow passing extra `classNames` to MenuItemsGroup, don't require a `label` * Change classes in MenuItemsToggle from `components-menu-items__toggle` to `components-menu-items__button is-toggle` * EllipsisMenu: Adopt areas Editor, Settings, Tools commit 27e6fa8 Author: Stephen Edgar <[email protected]> Date: Fri Jan 12 18:43:28 2018 +1100 Use tabs for indentation in build tools JSON files per WP Coding Standards (#4419) * chore: Update `.editorconfig` to match WordPress' upstream * chore: Use tabs for indentation in `package.json` and `package-lock.json` files * chore: Use tabs for indentation in `.eslines.json` file * chore: Use tabs for indentation in `composer.lock` file commit 9212841 Author: Grzegorz (Greg) Ziółkowski <[email protected]> Date: Fri Jan 12 08:18:57 2018 +0100 Docs: Update info about test fixtures (#4401) commit d129a6c Author: Joen Asmussen <[email protected]> Date: Fri Jan 5 11:21:41 2018 +0100 Fix issue where black rectangle would briefly blink on new paragraphs In master, if you press enter a lot and type a lot, a black rectangle sometimes briefly appears. This is the isEditing rectangle we use to indicate where the cursor is, if it's not in text, i.e. if you have a placeholder selected. This PR adds a teensy delay to this so it shouldn't show up. commit 5d4e19d Author: Robert Anderson <[email protected]> Date: Fri Jan 5 11:01:29 2018 +1100 Enable TinyMCE sanitization when setting HTML content We were previously disabling TinyMCE sanitization by calling setContent with `{ format: 'raw' }`. Doing so, however, causes issues when setContent is called with prettified HTML, e.g. when a list block is updated.
@helen thanks for the update. This makes sense to me because the @-username functionality should not be doing too much, as the main benefits are in how a server/network would handle notifications, etc. The important thing is we have an easily extendable mechanism for inline tokens, where people could supply their own arrays of items to be used in the auto-complete. There's more work to do here for this to be a solid API. |
Rather than inserting a static link and the display name, both of which may change over time and lead to stale content, follow the pattern of existing user mentions in WordPress projects and insert a plaintext mention using the username.
Bringing this over from #4406:
I think that this feature should switch to inserting just @username, no link. Maybe a surrounding span at most. My reasoning for this is:
One thing I didn’t try messing with in my first attempt at a Gutenberg PR was with what
allowNode
actually does. I don’t know if that needs changing.