Jump to content

Wikifunctions:Status updates/2024-08-02

From Wikifunctions
Wikifunctions Status updates Translate

<translate> Abstract Wikipedia via mailing list</translate> <translate> Abstract Wikipedia on IRC</translate> <translate> Wikifunctions on Telegram</translate> <translate> Wikifunctions on Mastodon</translate> <translate> Wikifunctions on Twitter</translate> <translate> Wikifunctions on Facebook</translate> <translate> Wikifunctions on YouTube</translate> <translate> Wikifunctions website</translate> Translate

Revamping our 'About' widget

This week, I’d like to highlight one of the significant updates we’ve been focusing on this quarter— language and editing improvements to the ‘About widget’. We started the journey with user stories that revolved around better fallback language guidance and editing experience on function pages. Currently, the process of adding content in multiple languages is not as efficient as it could be, and sometimes Wikifunctions displays content in a language that readers don’t know or can’t speak. To enhance the user experience, we have identified and planned improvements in two key areas.

For readers, we wanted to ensure that content is displayed in their preferred languages by default, and indicate when content is not available in their language. Our hope is to give these users the opportunity to contribute to fill in those gaps. For editors, we wanted to streamline the translation process, making it possible to add multiple translations in one publishing flow.

As part of this work this week, we have upgraded from an outdated UI element to a more refined and efficient Codex equivalent. Below is a preview of what the rest of the improvements will look like once it’s live. If you are a multilingual user and would like to give us some feedback either now or once the feature is released, it will be of immense help for us to iterate and improve. Please express your interest in our discussion page for this change that is under way. Here is a sneak-peek of the feature:

Editing in-page: When creating a new object (e.g. test), it will be possible to add labels to an object without the need to open a separate dialog.
Content language: When reading, content will always be displayed in the same language as your UI language.
Fallback language: If content is not available in your UI language, Wikifunctions will display a placeholder text (e.g. Untitled) in the same language, and separately the same content in a fallback language, if available.
Helper text: When providing missing content, Wikifunctions will display a fallback language as a helper text below the text field.

.

Recent changes in the software

We have a few smaller bug-fixes this week, whilst we focus our work on the wider Quarterly work.

We changed some things about the object selector control. When there are more than ten values to show, such as for months of the year, the selector will expand for further items (T368153). It will now show the ZIDs of the values rather than their labels when you're using ?uselang=qqx (T368147).

A while ago, we built our "chip" component for editing aliases. Since then, an upstream Codex version was released, with almost-identical design and better accessibility. We have now swapped out one of our uses of the old component for Codex's, on the Function editor page; soon, we'll also replace the other, in the About dialog (T334738), as part of wider improvements to the About dialog we're doing this Quarter (T360610).

We fixed a bug that meant that the label above the Type field for each input on the Function editor didn't show up (T371241).

We deployed new versions of the back-end services, which should improve our logging (T364413). We believe we have fixed one of the issues that caused service instability two weeks ago (T369653). Occasionally, responses would have details of function calls returned instead of their values; this should now be fixed (T369173).

We've gone through the Jest test code of our Vue front-end and fixed a large number of warnings related to missing or wrongly-typed properties, and similar issues, including finding one minor user-facing bug, now fixed.

We've added support for three new languages alongside them being added to the wider MediaWiki ecosystem: Z1935/tji (Northern Tujia; no task yet), Z1936/msi (T370355), and Z1937/acf (T371051).

We, along with all Wikimedia-deployed code, are now using the latest version of the Codex UX library, v1.10.0, as of this week. It should have no user-visible changes on Wikifunctions, so please comment on the Project chat or file a Phabricator task if you spot an issue.

No weekly status update next week

There will be no weekly update next week, but we will be back with exciting things to share from Wikimania, the week after, that is the week of August 12th.

Function of the Week: N months after month

As we introduce new complex types to support our planned work for this quarter, I thought it would be helpful to highlight a function that uses the Gregorian month type as input and output. The "N months after month" function calculates the Gregorian month that occurs after N months from the input month. A seemingly simple function like this could have very useful real-world applications, like determining the renewal or expiration month of a subscription service, or for setting deadlines or milestones for project management, in projecting future financial scenarios for loan or investment planning that has monthly adjustments, or academic scheduling for length of a course or end date, healthcare appointments, planning campaigns, legal and compliance deadlines, and many more areas, and also in any Wikipedia article that references content related to such topics.

This reinforces our belief in the power of functions and in their quiet ability to nourish knowledge equity amongst the wikis one day.

This function has 2 implementations - one in javascript and the other in Python. The Javascript implementation does this by using modular arithmetic to ensure that the result wraps around correctly, so it always returns a value between 0 and 11, after the addition.

The Python implementation is currently detached but follows a similar modular approach to achieve the result.

We currently have only one test for this function to check the validity of the result. We encourage you to create more tests, implementations and add in any meaningful way to this and other such great but lean functions on Wikifunctions.