whatwg / whatwg/html

Editorial: topmost popover ancestor should not use a map

Open
#8,971 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

clarification topic: popover
Dominant language
HTML
Stars
9.4k
Forks
3.2k
PR merge metrics
PR metrics pending

Description

While this is a reasonable implementation strategy to get O(1), it makes the algorithm a lot harder to read. We should get the index of the item in the list instead when it comes time to compare. That will require defining index in Infra, but that seems like a good thing to be doing regardless.

cc @mfreed7 @josepharhar @domenic

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the topmost popover ancestor algorithm and its current map-based comparison in the HTML Standard. Read the relevant Infra definitions to determine where an index operation belongs. Done means the algorithm compares the item's list index and the required index definition is added to Infra.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.