Repository navigation
Tag chips: no page progress bar, loader on the chip, community title for community ids - #1718
Conversation
…e loader on the chip The progress library attaches a capture-phase click listener to every anchor, so pressing the follow control inside a tag chip started the top-of-page bar as if a navigation had begun, before the control could stop the click. The control now carries the library's opt-out attribute, and while a follow is in flight it shows a spinner in place of its icon, so the loading state sits on the chip rather than on the page.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 7 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
PR Summary by QodoPrevent page progress for tag-chip follow actions
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
…'s title The footer showed a community id (hive-125125) where the header names the community. TagChipLabel names a community id by its title: the post's own community from the entry, without a lookup, and any other community id in the list from the same cache entry the community pages use.
Two follow-ups on the post footer chips from #1715.
No page progress bar, loader on the chip (#1717)
Pressing the follow control on a tag chip started the top-of-page progress bar as if a navigation had begun. The progress library attaches a capture-phase click listener to every anchor, so it fires before the control can stop the click. The control now carries the library's own opt-out,
data-prevent-progress="true", which it reads off the clicked element or any ancestor below the anchor, so a click on the icon is covered too. The chip's link keeps its bar for a real navigation.While a follow or unfollow is in flight the chip control shows a spinner in place of its icon, so the loading state sits on the chip rather than on the page.
A community chip reads as the community's title
The footer showed
hive-125125where the header names the community.TagChipLabelnames a community id by its title: the post's own community straight from the entry, with no lookup, and any other community id in the tag list from the same cache entry the community pages use, with the id standing in until it resolves. Plain tags read as themselves.Tests
The chip spec asserts the opt-out attribute and the spinner during a held list refetch.
entry-tags.spec.tsxasserts the post's community is titled without a lookup, plain tags are untouched, and another community id resolves to its title. Typecheck, lint and the icon audit clean.Closes #1717