Repository navigation
feat(topics): add CSV export button to header - #53
Conversation
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
|
Thanks for the pointers. This PR addresses #39. Local check: Vercel check is currently blocked by fork authorization. I cannot authorize that from the fork side. |
Added a new
Export CSVbutton to the Topics page header, placed immediately beforeManage topics.Implemented client-side CSV export for the current
topicsstate with the exact 10 requested columns and null-safe values:topicprompt_countavg_visibility_scorevisibility_changetotal_mentionstotal_citationsshare_of_voicetop_competitortop_competitor_sovlast_run_atAdded
web/src/lib/csv.ts(toCsv) and reused it from the Topics page.Export filename format follows the requested convention:
ansvisor_<brand-slug>_topics_<YYYY-MM-DD>.csv.The button is disabled when
loadingor when there are no topics, with a hover hint on the disabled state./dashboard/topicswith a brand that has topic data.Export CSVis visible and sits left ofManage topics.Export CSVand confirm filename format:ansvisor_<brand-slug>_topics_<YYYY-MM-DD>.csv.topCompetitor = nullexport emptytop_competitorandtop_competitor_sov.visibilityChange = nullexport emptyvisibility_change.Validation run:
corepack yarn typecheck(web)Closes #39.