Update: The new feature:
Original task:
A request has been made at de.wp that the special characters panel "remembers", and shows prominently, the last chars an editor has added to articles. I think this had been requested in the past as well, possibly on the mediawiki.org related thread.
Story
As a volunteer creating a new article/page and/or editing an existing one, I want to be able to quickly find and insert the special character(s) I'm seeking so that I can remain in flow and express the thought(s) in my mind with minimal interruption/friction.
Requirements
On all platforms and editing interfaces where the Special characters menu is currently available:
- Introduce a new section named Recently used
- This section will be populated with the 32 special characters you have used most recently, across editing sessions
- When A) the newly-introduced Recently used section becomes filled with number of special characters defined in "1.A" and B) you use a special character currently not present within the Recently used section, the special character you have used least recently should be ejected to create space for the character you will have just used
The Recently used section "1." describes ought to remain hidden until after you've used ≥1 special character after the feature is introduced- This requirement did NOT get implemented in this first iteration
- Upon using ≥1 special character after the feature is introduced, the Recently used section should appear in the first position within the special characters menu.
References
DetailsSubject Repo Branch Lines +/- Add a "recently used" feature to the special characters input mediawiki/core master +8 -1 Customize query in gerritRelated Objects- Duplicates Merged Here
- T278915: Make the special character toolbar's "Often used" section dynamic
Event Timeline
Comment ActionsI'd suggest "recently used" instead of "often used", as that's probably more common elsewhere, and you don't have to keep track how often which character is used. So the code would be something like this:
- When the users clicks on a special character, push its definition to an array, truncate that array to a maximal length.
- Store that array (via ve.userConfig).
- When building the special character dialog, just include those recently used characters as well (just like you already do for the ones defined in MediaWiki:Visualeditor-quick-access-characters.json)
Comment ActionsThis section will be populated with the INSERT NUMBER special characters
I would propose we go with 32 to start with, as in Vector 2022 at full width, this is exactly two rows of characters:
We should also come up with a better name for the "Often used" section as it sounds confusingly similar to "Recently used", but one does not immediately spring to mind.
Comment ActionsI'm a solid chunk of the way through this and I hope to have a PatchDemo for you all very shortly. There's a little bit of fiddlyness to make sure that the "recently used" both updates the concept of what was recently used (as you'll have just used the characters in it!) while not reordering it underneath your mouse cursor.
Comment ActionsChange #1101529 had a related patch set uploaded (by Zoe; author: Zoe):
[mediawiki/extensions/VisualEditor@master] WIP: Hook for storing SpecialCharacterDialog recently-used list
Comment ActionsChange #1100519 had a related patch set uploaded (by Zoe; author: Zoe):
[VisualEditor/VisualEditor@master] WIP: keep track of recently used symbols
Comment ActionsChange #1101529 had a related patch set uploaded (by Zoe; author: Zoe):
[mediawiki/extensions/VisualEditor@master] Register preference for SpecialCharacterDialog recently-used list
Comment ActionsChange #1100519 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Keep track of recently used symbols
Comment ActionsChange #1101529 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5c98d9b41)
Comment ActionsChange #1111229 had a related patch set uploaded (by Zoe; author: Zoe):
[mediawiki/core@master] WikiEditor: Translations for "recently used"
Comment ActionsChange #1111232 had a related patch set uploaded (by Zoe; author: Zoe):
[mediawiki/extensions/WikiEditor@master] Add a "recently used" feature to the special characters input
Comment ActionsChange #1111229 merged by jenkins-bot:
[mediawiki/core@master] WikiEditor: Translations for "recently used"
Comment ActionsProposed copy. @Quiddity, how does this look to you? Notice anything that could benefit from revision?
The "Special characters" menu will now show the 32 special characters you have used most recently, across editing sessions. You will notice this change in both the WikiEditor and VisualEditor.
Comment Actions@ppelberg For Tech News: That's great, thank you! I'll probably tweak the order of statements so that we lead with who the target audience is (all editors), and thus use something like:
Editors who use the "Special characters" menu can now see the 32 special characters you have used most recently, across editing sessions on that wiki. You will notice this change in both the WikiEditor and VisualEditor.
[Question: I'd guess it is per-wiki? Or is it SUL-wide?]
For documentation to link to: I wonder if something (screenshot? short sentence?) could be added to the relevant page(s) on MediaWiki-wiki?
Comment ActionsChange #1111232 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Add a "recently used" feature to the special characters input
Comment ActionsThis looks great.
[Question: I'd guess it is per-wiki? Or is it SUL-wide?]
@Quiddity, to confirm: are you asking about the scope of the feature's memory? E.g. does it build a separate memory for the special characters you use on each wiki? Does it build one memory that spans across projects? Something else?
For documentation to link to: I wonder if something (screenshot? short sentence?) could be added to the relevant page(s) on MediaWiki-wiki?
Great spot; how
Comment ActionsChange #1114667 had a related patch set uploaded (by Zoe; author: Zoe):
[mediawiki/extensions/WikiEditor@master] Updates the recently-used count to 32
Comment ActionsMy apologies – until this lands, WikiEditor will keep the 20 most recent whereas ve keeps the 32 most recent. Changes are synchronised between the two, so if a user switches from ve to VisualEditor they may lose the 11 least recent until next week.
The values are synchronised between WE and VE.
Comment ActionsYup, that, which I see is answered in the new documentation! ("on that wiki").
Great spot; how does this look?
Looks good. Thanks again!
Comment ActionsChange #1114667 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Updates the recently-used count to 32
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add a "recently used" feature to the special characters input | mediawiki/core | master | +8 -1 | |
Customize query in gerrit
Related Objects
Event TimelineComment Actions I'd suggest "recently used" instead of "often used", as that's probably more common elsewhere, and you don't have to keep track how often which character is used. So the code would be something like this:
Comment Actions
I would propose we go with 32 to start with, as in Vector 2022 at full width, this is exactly two rows of characters: We should also come up with a better name for the "Often used" section as it sounds confusingly similar to "Recently used", but one does not immediately spring to mind. Comment Actions I'm a solid chunk of the way through this and I hope to have a PatchDemo for you all very shortly. There's a little bit of fiddlyness to make sure that the "recently used" both updates the concept of what was recently used (as you'll have just used the characters in it!) while not reordering it underneath your mouse cursor. Comment Actions Change #1101529 had a related patch set uploaded (by Zoe; author: Zoe): [mediawiki/extensions/VisualEditor@master] WIP: Hook for storing SpecialCharacterDialog recently-used list Comment Actions Change #1100519 had a related patch set uploaded (by Zoe; author: Zoe): [VisualEditor/VisualEditor@master] WIP: keep track of recently used symbols Comment Actions Change #1101529 had a related patch set uploaded (by Zoe; author: Zoe): [mediawiki/extensions/VisualEditor@master] Register preference for SpecialCharacterDialog recently-used list Comment Actions Change #1100519 merged by jenkins-bot: [VisualEditor/VisualEditor@master] Keep track of recently used symbols Comment Actions Change #1101529 merged by jenkins-bot: [mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5c98d9b41) Comment Actions Change #1111229 had a related patch set uploaded (by Zoe; author: Zoe): [mediawiki/core@master] WikiEditor: Translations for "recently used" Comment Actions Change #1111232 had a related patch set uploaded (by Zoe; author: Zoe): [mediawiki/extensions/WikiEditor@master] Add a "recently used" feature to the special characters input Comment Actions Change #1111229 merged by jenkins-bot: [mediawiki/core@master] WikiEditor: Translations for "recently used" Comment Actions Proposed copy. @Quiddity, how does this look to you? Notice anything that could benefit from revision? The "Special characters" menu will now show the 32 special characters you have used most recently, across editing sessions. You will notice this change in both the WikiEditor and VisualEditor. Comment Actions @ppelberg For Tech News: That's great, thank you! I'll probably tweak the order of statements so that we lead with who the target audience is (all editors), and thus use something like:
[Question: I'd guess it is per-wiki? Or is it SUL-wide?] For documentation to link to: I wonder if something (screenshot? short sentence?) could be added to the relevant page(s) on MediaWiki-wiki? Comment Actions Change #1111232 merged by jenkins-bot: [mediawiki/extensions/WikiEditor@master] Add a "recently used" feature to the special characters input Comment Actions This looks great.
@Quiddity, to confirm: are you asking about the scope of the feature's memory? E.g. does it build a separate memory for the special characters you use on each wiki? Does it build one memory that spans across projects? Something else?
Great spot; how Comment Actions Change #1114667 had a related patch set uploaded (by Zoe; author: Zoe): [mediawiki/extensions/WikiEditor@master] Updates the recently-used count to 32 Comment Actions My apologies – until this lands, WikiEditor will keep the 20 most recent whereas ve keeps the 32 most recent. Changes are synchronised between the two, so if a user switches from ve to VisualEditor they may lose the 11 least recent until next week. The values are synchronised between WE and VE. Comment Actions Yup, that, which I see is answered in the new documentation! ("on that wiki").
Looks good. Thanks again! Comment Actions Change #1114667 merged by jenkins-bot: [mediawiki/extensions/WikiEditor@master] Updates the recently-used count to 32 |