Quantcast
Channel: Products » Features
Viewing all articles
Browse latest Browse all 9

New feature pages, now with forms & queries!

$
0
0

I’m not going to go into a whole lot of detail since I’ve already blogged fairly extensively about this here, here, and here), so here’s the tl;dr version:

  1. The old feature pages worked well enough to get us through our first release cycle in the new Train Model world, but they fundamentally kinda sucked.
  2. We learned a lot in the process, and we’ve now launched the second version of the system, which includes a more logical page structure and uses much smarter tools. It’s still the wiki, but it’s the wiki with a couple of completely fantastic add-ons (this one, and this one).
  3. The most important benefits are:
  • New feature pages can be created and edited using a simple web form
  • The resulting feature pages support database-like queries for automatically generating lists, alternate views, and etc.

In other words: creating and editing feature pages is way easier than it used to be, and we no longer have to manually update things like the release trackers & feature lists because we can just build custom queries to do all of that for us.

Forms? In a wiki?

It’s true! Here’s a demo!

  1. Go here: Feature page demo
  2. Click the “Edit with form” link at the top
  3. Gasp with surprise and delight

Edit with form

Any feature page that is part of the new system will have the “Edit with form” link at the top. I strongly suggest you use the form because editing the raw text is significantly crappier and more error prone.

Migrating the old to the new

Unfortunately, the old pages don’t work with the new system at all — and we can’t use the form to edit/update them — so all still-relevant feature pages need to be migrated to the new system.

Happily, most of the existing feature pages have been migrated. If there are pages that haven’t been migrated that should be, you are welcome to migrate them yourself or ping me (deb-at-mozilla-com or “dria” on IRC) for help or if you have any questions.

Creating new feature pages

Do you want to create a new feature page? It’s super easy!

Create a new feature page

  1. Go here: Create a new feature page
  2. Follow the directions (4 steps, very simple)
  3. Ta dah!

Now the really cool part: Queries

The new system allows us query the feature pages and return results based on a variety of queryable properties in the pages themselves.

The query system is both straightforward and powerful. Here’s an example query that returns a list of all the prioritized feature pages for Mobile, and formats them as a simple table:

{{#ask: [[Category:Feature Page]] [[Feature list::Mobile]] [[Feature priority::!Unprioritized]]
| ?
| ?Feature name#
| ?Feature priority#
| ?Feature engineering team#
| ?Feature stage#
| ?Feature status#
| ?Feature feature manager#
| sort=Feature priority
| format=table
}}

You can see the result of that query here: Basic table.

It’s possible to make things a lot prettier, however, through a combination of templates, tables, and CSS:

<table class="querytable sortable">
<tr>
<td class="header" style="width: 5%;">Pr</td>
<td class="header" style="width: 30%;">Feature</td>
<td class="header" style="width: 15%;">Team</td>
<td class="header" style="width: 15%;">Stage</td>
<td class="header" style="width: 15%;">Status</td>
<td class="header" style="width: 20%;">Feature manager</td>
</tr>
{{#ask: [[Category:Feature Page]] [[Feature list::Mobile]] [[Feature priority::!Unprioritized]]
| ?#
| ?Feature name#
| ?Feature priority#
| ?Feature engineering team#
| ?Feature stage#
| ?Feature status#
| ?Feature feature manager#
| mainlabel=-
| sort=Feature priority
| format=template
| limit=500
| template=FeatureListTable
}}
</table>

This query creates a result table that looks like this: Mobile Feature list. Shiny!

Other query examples

Here are some other examples of what the queries can do. Feel free to “edit” any of these pages to see what the queries look like — they’re simple and powerful.

NOTE: please don’t actually change the code on any of these, as they’re mostly live and in-use — if you copy the code to another page on wiki.mo, you can mess around with it there. Thanks!

For more information about queries and how to write your own, see the add-on’s query documentation, with a super handy page about Selecting pages.

Pro tip!

If you make a change to a feature page and the query
doesn’t seem to be updating properly, please append

?action=purge

to the end of the URL and reload. This forces a
refresh of the cache, which is a bit aggressive sometimes.

Questions? Feedback? Need help?

If you would like to chat about this new system, or if you need help or have questions, please feel free to ping me any time, through any of the usual channels.


Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images