Closed Bug 1077879 Opened 10 years ago Closed 9 years ago

[Compat Data] Feature view can return HTML fragment

Categories

(developer.mozilla.org Graveyard :: General, enhancement)

All
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Unassigned)

References

Details

(Whiteboard: [specification][type:feature])

What problems would this solve?
===============================
The feature view JSON requires a lot of JavaScript code to change it into HTML tables.  This could be done on the server side, and the embedded JS code would be a lot smaller

Who would use this?
===================
The MDN compat table spike, the vanilla JS for embedding

What would users see?
=====================
Users would see an unstyled HTML fragment including headers and a table

What would users do? What would happen as a result?
===================================================
Inject the entire section into the page, or parse out and inject the interesting bits.  They would merge sample CSS into their site's stylesheets.

Is there anything else we should know?
======================================
From a September 2014 design discussion about integration strategies with MDN
Blocks: 1063154
Severity: normal → enhancement
Blocks: 996570
No longer blocks: 1063154
Commits pushed to master at https://github.com/mozilla/web-platform-compat

https://github.com/mozilla/web-platform-compat/commit/81d8e0bf767ad9303b524394cd6f753aa431bde4
bug 1077879 - Add HTML variant of feature view

Includes basic representations of resources, including:
- Browsers - Translated names
- Features - Translated name, default flags
- Maturity - Translated name
- Section - Translated name, number, notes, and link
- Specification - Translated name and link
- Supports - 'yes' supports w/ default flags, no notes
- Version - version show on 'yes' support, no links

https://github.com/mozilla/web-platform-compat/commit/b51bc9c273c11674f35448c362751550134c51b0
bug 1077879 - Allow inconsistant instance cache

Add drf-cached-instances=0.2.0, and add setting
DRF_INSTANCE_CACHE_POPULATE_COLD (default on) to control if instance
cache is populated on missing entries.  Turning off will allow for
faster updates but may result in an inconsistant cache.

https://github.com/mozilla/web-platform-compat/commit/853cc89784b58795a84eb0eb902bc4a8ec9a622f
bug 1077879 - Improve view_feature HTML view

- Whenever support changes between versions, add it to
  meta.compat_table.supports (for example, supported with prefix to
  supported without prefix)
- In meta.compat_table.supports, order features by tree order, not hash
  order
- Add meta.compat_table.footnotes - Important supports with footnotes
- Add notes, footnotes, and prefixes to HTML view
- If support is not "yes", display next to version number
- Plain support "yes" displayed in parens: "(yes)"

https://github.com/mozilla/web-platform-compat/commit/3aa558c5181a39438e1dac5d4753f9b01342d08d
bug 1077879 - Add pagination links to feature HTML

Many paginated features (such as /Web/CSS) will include features without
support info.  In these cases, display these features w/ ? for unknown
support.

https://github.com/mozilla/web-platform-compat/commit/fa001a18df56f1ae078ee860e73fe050c5619262
bug 1077879 - Add JS-enabled HTML generator

/view_feature/<feature_id> will call /api/v1/view_features/<feature_id>
and display the available data.  It resembles the MDN format, but is not
supposed to be identical.

https://github.com/mozilla/web-platform-compat/commit/ae622a77a52685f34ed7018f8a4be0465541681b
bug 1077879 - Add link to browse app

On the browse detail page /browse/features/<feature_id> , add a
prominent link to the JS-enabled feature view

https://github.com/mozilla/web-platform-compat/commit/13e3a6fe60a35670dc91e2d685af522a477cf506
fix bug 1077879 - Add upload of features.sections

Move features.sections to the writable links section, so that they are
considered significant when tools/upload_data.py looks for changes.
Also used OrderDict when loading the local data collection, so that
translations will be correctly ordered and diffs will be easier to read.

https://github.com/mozilla/web-platform-compat/commit/1ad128cf86bac5feb6e71f8b9b56470bae551a02
Merge pull request #18 from jwhitlock/1077879_html

Fix bug 1077879 - Add an HTML view
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.