Page MenuHomePhabricator

Allow for Custom Edit Bar for Pages based on Index.
Open, Needs TriagePublic

Description

While the ability exists for a user to create a custom edit bar, it would be more useful to allow the selection of a custom edit bar per Index. For example, a text can contain characters not found on a standard keyboard of a particular language or require the usage of special templates (such as EB11). It would be ideal to allow the selection of a Custom Edit Bar on an Index that would then replace the standard one in the Pages ns.

For example,
An Old English edit bar would contain the additional letters needed for proofreading Old English text and the standard formating ones.

A Latin + Greek editing bar would contain polyphonic Greek and Latin letters with diacritic markers.

etc.

To ease, the complexity of implementation, it would probably make sense to allow for the loading of js templates rather than coding in the custom edit bars directly into ProofPage.

Event Timeline

Hi, @Languageseeker I had setup the proofreadpage but don't know how to use in mediawiki docker.

localhost_8080_wiki_Main_Page (3).png (638×1 px, 88 KB)

@Sandyabhi Try the steps here to check if the ProofreadPage extension works as intended.

Also, if you any doubts about the ProofreadPage/PagelistWidget project, feel free to ping me on Zulip chat under the ProofreadPage topic (Wikimedia Zulip Chat).

Priyanshugupta1909 subscribed.

Hi @Languageseeker i would like to work on this project
I know Html Css and Reactjs well.
So please assign me this project

Is this not possible via normal Wikieditor customisation?

https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization#Add_characters_to_an_existing_special_characters_page

For example, I have a function to add some chars for an index:

var addCharacters = function() {

  $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    'section': 'characters',
    'pages': {
      'yazidi': {
        'layout': 'characters',
        'label': 'Yazidi',
        'characters': [ 'Ḍ', 'ḍ', 'Ḳ', 'ḳ', 'Ṣ', 'ṣ', 'Ḫ', 'ḫ', 'Š', 'š', 'â', 'î' ]
      }
    }
  } );
};

So all we need is a way to inject the data into the Page: namespace based on "something" in the Index page.

@Inductiveload Yes, your thinking is close to mine. Basically, this would have three components.

  1. A template such as yours.
  2. A section on the Index page to select the template.
  3. The ability to inject this data into the Page: namespace.

In many ways, I'm trying to replicate the way that books were actually typeset. Printers had boxes of type that they could reach into and grab the appropriate character. A custom edit bar would make it much easier to insert the appropriate characters and formatting for a text.

Much of this is we need to recast our "special characters" box into something actually useful (probably organised more thematically rather than by Unicode codepage). E.g. "Old English" or "Polytonic Greek", so you don't have to dig about in hundreds of useless chars for the job at hand.

@Inductiveload @Languageseeker This is certainly possible. But it will probably require some more hashing out... For example, which characters should be added based on the parameters on the Index: pages.

Or should it be like a separate housekeeping parameter

@Inductiveload @Soda In my opinion, it's both characters and templates. Take for Example, the EB11 project that uses custom templates such as {{EB1911 Fine Print|}} It would make sense for these templates to be in the Edit Bar of all EB11 projects, but not in a book on English Poetry. Also, I would want the characters to be readily accessible not buried in menus.

@Soda, I think a minimal viable solution here is to extend T255345 to add the other index parameters to Pages via mw.config, then you just need to add a field to [[MediaWiki:Proofreadpage index data config]] and you can process that with JS however you like.

Moving the processing into the extension is then just a nice-to-have to make it default behaviour.

@Languageseeker you can have templates as well with the Wikieditor configuration API. For example the new CSS wikieditor tools provide some pre-set snippets: https://en.wikisource.org/wiki/Help%3AGadget-WikiEditorTools

2021-03-24_154433_1334x301_screenshot.png (301×1 px, 65 KB)

@Inductiveload Templates are great as well and may be easier to do.

@Priyanshugupta1909: Per emails from Sep18 and Oct20 and https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup , I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!