Trình soạn thảo mã wiki 2017

From mediawiki.org
This page is a translated version of the page 2017 wikitext editor and the translation is 21% complete.
Outdated translations are marked like this.

Trình soạn thảo mã wiki 2017 là một chế độ trong tiện ích mở rộng Trình soạn thảo trực quan cho phép người dùng sử dụng các công cụ và thanh công cụ của trình soạn thảo trực quan trong khi chỉnh sửa mã nguồn wiki. Nó có thể được truy cập từ trong trình soạn thảo trực quan bằng cách nhấn vào nút trên thanh công cụ để chuyển sang mã wiki.

The 2017 wikitext editor was released to Wikimedia Foundation-hosted wikis in 2023. Nó không được bật theo mặc định. Bạn có thể chọn tham gia sử dụng nó trên các wiki của Wikimedia như một Tính năng Beta dành cho máy tính để bàn bằng cách đi tới tùy chọn của bạn, nhấp vào hộp kiểm cho "Chế độ wikitext mới", sau đó nhấp vào "Lưu".

Nó là gì

Để hỗ trợ cho một trong những mục tiêu trong Kế hoạch Thường niên năm 2016-2017, "Duy trì và từng bước cải thiện giao diện tạo và quản lý nội dung", Bộ phận Chỉnh sửa đang làm việc với một trình soạn thảo mã wiki mới.

Nó được tích hợp vào Trình chỉnh sửa trực quan để chuyển đổi tốt hơn giữa hai. Nó có thiết kế tương tự và nhiều công cụ có trong trình chỉnh sửa trực quan, bao gồm cả dịch vụ citoid. Chế độ chỉnh sửa Wikitext mới có sẵn như một tính năng thử nghiệm cho người dùng máy tính. Nhiệm vụ chính của Pharbicator là task T104479 (phần mềm đôi lúc được nói đến là "trình chỉnh sửa Wikitext hiện đại" hoặc "trình chỉnh sửa Wikitext mới"/"NWE")

Đây là một trình soạn thảo mới, không phải là một phiên bản sửa đổi dựa trên trình soạn thảo wikitext hiện có. Chế độ Tính năng Beta cho phép người dùng cung cấp phản hồi và sẽ dành thời gian để tránh đột ngột làm gián đoạn các trình chỉnh sửa và phá vỡ các tiện ích hiện có. As the editor is based on VE surface, and not a standard textarea, then many of the editing gadgets do not work with that (it requires using very specific API to access wikicode). Gadgets that open an edit form and require a textarea can switch to plain wikicode editor using action=submit (rather than action=edit).

Những lý do cho dự án này là gì?

Vào năm 2010, Wikimedia Foundation đã hoàn thành dự án Usability (cung cấp cho chúng tôi giao diện Vector hiện tại, công cụ tải lên và trình chỉnh sửa nội dung) và chuyển sang các vấn đề được cộng đồng lựa chọn trong Chiến lược 2010–2015. Điều này đã bao gồm một số cải tiến cho các công cụ chỉnh sửa, đáng chú ý nhất là trình chỉnh sửa trực quan, cùng với thông báo và các cải tiến khác. Tuy nhiên, chiến lược này không phải và chưa bao giờ bao gồm việc thay thế wikitext; chúng tôi nhận thấy cả hai hệ thống chỉnh sửa đều quan trọng trong dài hạn để giúp cộng đồng tiếp tục thực hiện các dự án Wikimedia thành công như hiện tại.

Tính đến tháng 12 năm 2016, trên hầu hết các wiki của Wikimedia, chúng tôi cung cấp ba trình soạn thảo nội dung chính. Chúng không nhất quán đối với người dùng về giao diện, hoạt động, hiệu suất và về việc trợ giúp và hỗ trợ cho họ. Một trong số đó là trình soạn thảo wikitext dành cho máy tính để bàn từ năm 2010 được gọi là WikiEditor, một trình soạn thảo khác là trình soạn thảo trực quan ở dạng máy tính để bàn và thiết bị di động, và trình soạn thảo cuối cùng là trình soạn thảo wikitext di động.

Since 2010, we have learned a great deal about how users, both new and experienced, use our software and what they would like to see changed in our editing software. Our research has informed the construction of the visual editor around designs that work well for editors, giving clear signs to new users on how to use it whilst getting out of the way of those experienced users who prefer the WikiEditor that they already know. Though imperfect, we've seen strong preferences from new users for the visual editor's design, workflow cues, and overall experience. We've also learned a great deal in terms of engineering, and have built it in such a way that it can be used on a page (as when you click "Sửa mã nguồn") or inside a tool (as in Flow) and on desktop or mobile, and in a manner which is extensible by other features.

Having three inconsistent editing systems is bad. It is bad for newer editors because whatever they have learned from one editor cannot be applied to other contexts (such as editing a talk page). It is bad for experienced editors, who must address several questions before they can work out what the situation for the newbie is and so how to help. It is bad for sysops, who need to separately set up what their community needs in each of the editors—or else discover that they cannot get it in some editors. It is bad for script and gadget developers, who must deal with lots of different situations (or ignore them). It is bad for developers, who have to take three times as many parts of complexity into account whenever they need to fix something or add a feature. And it is bad for the donors to the Wikimedia Foundation, whose donations are spent supporting these multiple parallel work streams.

Consequently, we're working on a new wikitext editor, the 2017 wikitext editor. This will provide a single, integrated, consistent experience between desktop and mobile, and wikitext and visual editors. It will be a platform that can be integrated into other editors, so that the experience can be as close as possible between situations and content types. We'll give users as good an experience as we can, while limiting breakage of existing functionality.

Users who don't like it are able to turn it off. The current wikitext editor is not going anywhere, at least for the next few years. While we may eventually sunset it, anyone who likes it can keep it.

Mục tiêu và tình trạng phát triển

Phát hành lần đầu (Tính năng beta)

The initial goals for the project were to have parity with the existing wikitext editor, WikiEditor, using the same toolbar with the same buttons in the same positions as in the visual editor so users have consistent experience. This means providing at least all the controls in the wikitext editor, with very few exceptions for very rare buttons:

  • Basic tools (bold, italics, signature, links and images);
  • Advanced tools (headings, bullet lists, numbered lists, big, small, superscript and subscript, galleries and tables);
  • Special character insertion; and
  • Find-and-replace.

All these were completed as of August 2016, along with a lot of tools not in the existing wikitext editor (like strikethrough, underline, template inserting and so on), and features like pasted HTML being turned into wikitext automatically. In particular, we also provide the "citoid" auto-citation tool, which lets users quickly add references based on URLs or DOIs. This is similar to, but more advanced than, the gadgets that a few wikis like the English Wikipedia had written for themselves already, and they will now be available for all wikis.

We undertook extensive QA testing that the features work as expected, and a design review and structured user testing. Once we were happy that it is adequately working as intended, and is (at least) no worse for new users, we have sought feedback from experienced users of all levels via a Beta Feature.

Bản phát hành beta cuối (trước khi phát hành rộng rãi)

The point of the first release as a Beta Feature is to get some initial feedback on how well this new editor works for people. We expect the feedback to include a lot of suggestions for changes. There are a number of improvements that we're already considering. Some of these probably need to be addressed before the new wikitext editor would be released outside of a Beta Feature. Some of these are technically difficult and so have been postponed, whilst others would benefit from real-world feedback from existing users to shape the features as usefully as possible.

For the first category (big challenges), we believe that we will need to address section editing, in which clicking edit will show small parts of the page to edit, and a fully responsive design, so that the interface can scale up and down more cleanly for smaller devices, where users are zoomed-in, or other accessibility and platform reasons; these will let us provide the feature in mobile as a beta example as well, to ensure it works for all our editors, not just those on desktop.

For the second category (feedback needed), we will need to provide in-editor help to guide users through the editing process from the very first time they click edit and also later in their editing careers. Right now the wikitext editor has a "help" tab with some brief wikitext guidance; in the visual editor, we have a link to the user-guide, which we could replicate for this purpose. How this should work, and what it should highlight, is likely to be something on which many members of our communities have expert ideas. We will also need to clean up how gadgets extend the editor, as the new editor integration right now is complex and confusing. This would make converting some gadgets harder than it should be. Many wiki communities depend on particular gadgets to speed up their editing workflow, and it's important that we preserve the ability for wikis to flexibly experiment with improvements like this.

Naturally, any change of this scale is likely to be disruptive for some users' workflows, and will have a few issues with relative 'edge cases' not being addressed. We look forward to uncovering and addressing these over the weeks and months following the release of the Beta Feature.

Nice-to-haves

Alongside the above, there are other, new features we'd love to provide if possible, but which may prove too costly to develop or too slow for users, and so are not planned from the outset. One feature we'd be interested in providing is saving automatic local drafts as users edit, so that if their browser or computer crashes or loses power mid-edit they can resume rather than having to restart. This would rescue users from quite frustrating, if uncommon, occurrences, particularly people with old computers or poor network connections.

A big feature that often gets discussed is syntax highlighting of wikitext to help guide people's eyes to the right content for which they're looking. This feature was in fact built for the existing wikitext editor back in 2011, but we had to abandon it because the very high complexity of wikitext means that this was exceedingly slow for most users. Five years later, most users' machines are a fair bit faster than they were back then, which helps a little. Also, it might be worth exploring how performant we could make a feature doing this if we were to make some simplifications of the kinds of wikitext which we try to highlight.

(In the meantime, syntax highlighting is provided by Remember the dot's syntax highlighter and WikEd , which are available on some wikis as gadgets). Syntax highlighting has also been introduced gerrit:343878 to the 2017 wikitext editor using Extension:CodeMirror .

More complex and error-prone than syntax highlighting, but possibly even more useful, would be a feature for folding wikitext structures into blocks so that users can easily ignore things they don't want to edit without having to read through them. For example, long infobox invocations or references could be folded up into blocks until you want to edit them. The technologies we built for the visual editor are particularly well-suited for providing this use case in a reliable fashion, so this may be something we could look at doing. Again, as with syntax highlighting we might need to compromise on the complexity of wikitext that we recognize in return for providing something performant enough to be useful to most of our users.

Another nice feature we could provide would be to prompt users when they save with two or three buttons to add one-click edit summaries based on their recent activities. This kind of feature is quite popular on some wikis as a gadget and it would be nice to provide it to all users on all wikis, without those wikis needing to have a gadget guru on hand to help set it up and maintain it.

Resources


Xem thêm