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

Prefix ids with table #1963

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

arbelt
Copy link

@arbelt arbelt commented Mar 3, 2025

Summary

Initial implementation of prefixing element ids with the table id. This doesn't totally solve for potential duplicate IDs within a page, but should at least remove one of the most common sources (multiple tables with same column names).

This is a pretty big codebase. Happy to try to package this up more nicely but might need some pointers if there are interactions I'm missing.

Related GitHub Issues and PRs

Checklist

@CLAassistant
Copy link

CLAassistant commented Mar 3, 2025

CLA assistant check
All committers have signed the CLA.

@olivroy
Copy link
Collaborator

olivroy commented Mar 4, 2025

Thanks for the PR. I didn't really review, but if you want the CI to pass, you will have to run tests locally and accept snapshot changes. i.e. with testthat::snapshot_accept() for us to see the direct implications of your changes.

Also, you have to change the expected digest value in test-as_raw_html.R` for tests to pass. This is normal when we change the html code of a table.

rich-iannone and others added 15 commits March 5, 2025 11:05
… unprefixed and prefixed IDs, ensuring valid_html_id is only applied where necessary.
…olumn IDs individually, improving HTML compliance and clarity.
…g handling of group IDs and row boundaries for better HTML compliance.
…n for two-column stubs, improving HTML compliance and clarity.
…curate cell-specific group IDs for improved HTML compliance and clarity.
@arbelt arbelt force-pushed the prefix-ids-with-table-id branch from 8ddd2c2 to 28c59dd Compare March 6, 2025 18:18
@arbelt
Copy link
Author

arbelt commented Mar 6, 2025

thanks! I've updated some of the testing code & accepted snapshots, so they should pass, but I didn't have a chance to review all the snapshot changes

@arbelt arbelt changed the title WIP: Prefix ids with table Prefix ids with table Mar 11, 2025
@arbelt
Copy link
Author

arbelt commented Mar 11, 2025

@olivroy I've scanned through the snapshot results and addressed any issues I saw, so I think it's about set — at least no todos pending on my list for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants