Commit af6b840
refactor(table-chart): improve header ID sanitization based on review feedback
Addresses code review feedback from PR #35968:
- Collapse consecutive underscores in sanitized IDs for better readability
- Use nullish coalescing (??) instead of OR (||) for more precise fallback logic
- Add JSDoc documentation clarifying the need for ID prefixes
- Add comprehensive unit tests for consecutive underscore handling
These improvements enhance code quality and maintainability while preserving
the existing functionality and passing all existing tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9fcddc5 commit af6b840
File tree
3 files changed
+16
-5
lines changed- superset-frontend
- plugins/plugin-chart-table
- src
- test
3 files changed
+16
-5
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
155 | | - | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
| |||
859 | 864 | | |
860 | 865 | | |
861 | 866 | | |
862 | | - | |
| 867 | + | |
863 | 868 | | |
864 | 869 | | |
865 | 870 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
645 | 652 | | |
646 | 653 | | |
647 | 654 | | |
648 | | - | |
| 655 | + | |
649 | 656 | | |
650 | 657 | | |
651 | 658 | | |
652 | | - | |
| 659 | + | |
653 | 660 | | |
654 | 661 | | |
655 | 662 | | |
| |||
0 commit comments