Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <portal> feature (discouraged) #2593

Merged
merged 3 commits into from
Feb 5, 2025
Merged

Conversation

ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Jan 29, 2025

No description provided.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Jan 29, 2025
@ddbeck
Copy link
Collaborator Author

ddbeck commented Jan 29, 2025

It turns out that this doesn't even exist behind a flag anymore, so mdn/browser-compat-data#25805 is going to remove the data from BCD.

I have mixed feelings about this PR now. On the one hand, it's a little bit silly to create a feature that will never go anywhere. On the other hand, this feature can still do some useful things:

  • Direct developers to the contemporary alternatives
  • Safeguard against reusing the portal feature identifier
  • Map to the caniuse entry

After writing that out I'm still slightly on the side of including this, but it's a narrow decision.

@ddbeck ddbeck requested a review from Elchi3 January 29, 2025 19:09
@captainbrosset
Copy link
Contributor

Are you proposing that we keep this even if the BCD keys get removed? If yes, I like that thought. No reason web-features couldn't play this education role for developers (even in cases where there's nothing in BCD or caniuse to map to).

@Elchi3
Copy link
Collaborator

Elchi3 commented Jan 30, 2025

Much like in BCD or in documentation generally, I like to think about the whole lifecycle of data or docs. That said, in the web-features lifecycle, when would we consider removing this? Or does web-features never remove feature IDs at all? If it does, what are the lifecycle policies?

From BCD's lifecycle policies, we consider it "irrelevant" and the guiding factor for that is that no one shipped it (without flag) in the last two years and additionally, the spec is no longer being worked on.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Jan 30, 2025

For BCD, I think it makes sense to fully remove features:

  • To retain historic keys indefinitely, BCD would pay unbounded maintenance costs. Every key for every surface of every failed feature would have to be maintained (albeit minimally).
  • For fully withdrawn features after BCD's sunset period, BCD would tell no compatibility story not already represented by non-existence in BCD (that is, anything that doesn't exist is "compatible"). The only developer-facing information would be a specification URL.
  • Disambiguation has no meaning for BCD keys. If a new feature moved into a vacated namespace (e.g., some window.example fails, then 10 years later someone ships an unrelated window.example feature), BCD doesn't need to act is if those represent two different things, since APIs can never share a name (or at least not in ways that can't be represented by partial implementation data, which could be backfilled in such a scenario).

For web-features, we have a few different considerations:

  • The cost of preservation is much lower. We'd have to record just once that the entirety of feature's surface area is not shipping and link just once to an archival specification.
  • web-features provides information about discouraged features that is not in-scope for BCD, namely references to alternative successor features.
  • Relatedly, conceptual features seem to remain relevant longer than specific APIs. Alexis has said that historic features still get traffic, making him reluctant to remove them. I suspect there's also an opportunity here for web-features to help soften the harsh experience of MDN sometimes 404-ing removed reference pages.
  • Preventing ID reuse avoids disambiguation problems that web-features has that BCD does not have. If we remove a feature and later add a new one with the same ID, the Baseline web component could display data for the new feature on old, unrelated blog posts. This could mislead readers.

Copy link
Collaborator

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Daniel. I think I'm convinced.
LGTM with compat_features removed.

@captainbrosset
Copy link
Contributor

Same, LGTM with keys removed.

@ddbeck ddbeck merged commit 907e648 into web-platform-dx:main Feb 5, 2025
3 checks passed
@ddbeck ddbeck deleted the portal branch February 5, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants