Repository navigation
Make popover and checkbox ids unique across tables - #88
Merged
ilicfilip merged 1 commit intoOct 30, 2026
Merged
Conversation
The same option can be listed in more than one table (e.g. "Used, but not autoloaded" and "All options"). Both rendered the same popover and checkbox ids, so the "Show" button in the second table targeted the popover in the first, hidden table and nothing opened. Prefix these ids with the table id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test on Playground |
ilicfilip
requested review from
aristath and
jdevalk
and removed request for
aristath
October 30, 2026 06:16
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The same option can be listed in more than one table at once, for example in Used, but not autoloaded and in All options. Both tables rendered identical ids for the value popover and the row checkbox, so the page had duplicate ids. Clicking Show in the second table targeted the popover in the first (hidden) table, and nothing opened. The checkbox
<label for>had the same issue.Fix
Prefix the popover and checkbox ids with the id of the table they're rendered in (DataTables passes it as
meta.settings.sTableId), e.g.all_options_table-popover_option_foo. Onlyjs/admin-script.jschanges.The
<tr>row ids that DataTables generates are still the same across tables. That's left as is: row lookups go through each table's own DataTables API, so it has no functional effect.Testing
Tested on a local site with a non-autoloaded option that shows up in both Used, but not autoloaded and All options:
Note
This PR is stacked on #87, which changes the same render functions. Merge that one first; GitHub will then retarget this PR to
develop.🤖 Generated with Claude Code