Closed
Bug 1208913
Opened 10 years ago
Closed 10 years ago
Omit child pages in view_features
Categories
(developer.mozilla.org Graveyard :: BrowserCompat, enhancement)
developer.mozilla.org Graveyard
BrowserCompat
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jwhitlock, Unassigned)
References
Details
(Whiteboard: [bc:infra])
What problem would this feature solve?
======================================
A feature can either be an MDN page (mdn_url contains the page in different locales), or a row on an MDN page (mdn_url is null). A feature page's children are either the rows on that page or child pages on MDN. For example, this page:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
has 11 child features representing rows, and about 15 child features representing subpages like:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/altKey
The row-features are the useful ones for constructing a table. However, the page-features are also included, which is more information than needed and confuses the current implementation of {{EmbedCompatTable}}
Who has this problem?
=====================
Staff contributors to MDN
How do you know that the users identified above have this problem?
==================================================================
Demos of {{EmbedCompatTable}} include pages as child features rendered as rows with no known compatibility data.
How are the users identified above solving this problem now?
============================================================
It could be solved by removing rows with a non-null mdn_uri property.
Do you have any suggestions for solving the problem? Please explain in detail.
==============================================================================
Omit page child features from the included data, reducing the size of the view_feature payload. Mark them as page features in the meta section.
Is there anything else we should know?
======================================
For select pages, it may be desirable to include child page features in the display. This could be an option to {{EmbedCompatTable}} and the view_feature endpoint
Comment 1•10 years ago
|
||
Commits pushed to master at https://github.com/mdn/browsercompat
https://github.com/mdn/browsercompat/commit/0caa411943a1b7bd66b2807b0f24f936e2514afe
bug 1208913 - Remove doc view_feature test
Remove TestViewFeatureViewSet.test_get_documented, which has been
duplicated in the documentation API test "view-feature-by-id". This
required adding tests for code coverage.
https://github.com/mdn/browsercompat/commit/f198481f7a0965cdd504c5c90730637969ddb845
bug 1208913 - Add cached relations to Features
Add additional cached relations to features:
* row_children - the child PKs for row features
* page_children - the other child PKs (page features)
* row_descendants - the subtree that represents row features for this
feature (same as row_children for almost all cases)
https://github.com/mdn/browsercompat/commit/47800180b4ed1147a76b3420c971595cc58adbd8
bug 1208913 - Adjust query to prevent second query
The MPTT model loader needs parent_id. Adding it to get-by-slug query
means that a second query isn't made, so there is only one query with a
populated cache.
https://github.com/mdn/browsercompat/commit/7911db1a282b72d9cf4c4a9f98bbc5836e25310a
bug 1208913 - Add 'child_pages' query parameter
When a view_feature include the query parameter child_pages=1, it
includes the old behaviour of returning a paginated set of all child
features. If it is set to 0 or omitted, then only the row-level child
features are returned, and they are not paginated. This more closely
matches what is expected for constructing MDN tables.
This also adds a new item, meta.compat_table.child_pages, to reflect
what setting was used.
| Reporter | ||
Comment 2•10 years ago
|
||
https://browsercompat.herokuapp.com is up-to-date with these changes.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Keywords: in-triage
OS: Other → All
Summary: [CompatData] Omit child pages in view_features → Omit child pages in view_features
Whiteboard: [specification][type:feature] → [bc:infra]
Updated•5 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•