Skip to content

feat(buttons): unified TagChip rollout + small targeted UX fixes#6063

Open
tsahimatsliah wants to merge 2 commits into
feat/buttons-v2-reskin-v1from
feat/buttons-v2-small-fixes
Open

feat(buttons): unified TagChip rollout + small targeted UX fixes#6063
tsahimatsliah wants to merge 2 commits into
feat/buttons-v2-reskin-v1from
feat/buttons-v2-small-fixes

Conversation

@tsahimatsliah
Copy link
Copy Markdown
Member

@tsahimatsliah tsahimatsliah commented May 17, 2026

Layered on top of #6061 (V1 reskin). Merge that first.

Summary

Five independent, low-risk follow-ups that the reskin alone doesn't deliver. Total ~140 LOC across 7 files.

1. TagChip rollout

The unified TagChip primitive shipped with #6061 (file only, no call sites). This PR wires it up:

2. ProfileHeader edit-cover button typo

packages/shared/src/components/profile/ProfileHeader.tsx: `type={ButtonVariant.Float}` -> `variant={ButtonVariant.Float}`. The Float variant was silently ignored before this fix.

3. SidebarMenuIcon expand toggle

packages/shared/src/components/sidebar/SidebarMenuIcon.tsx: pin icon to `IconSize.Size16` so it doesn't overflow the 24 px collapse-hairline button.

4. ReadArticleButton outlined icon

packages/shared/src/components/cards/common/ReadArticleButton.tsx: drop `secondary` from `OpenLinkIcon` so the outlined glyph renders (matches V2 convention).

5. Strict-typecheck skip list

Add `ProfileHeader.tsx` and `tags/index.tsx` to the buttons-v2 strict-skip set. Both files carry pre-existing strict violations on lines unrelated to this PR's scope.

Skipped vs the consolidated branch

  • SharePostContent `iconPosition` — already a no-op after feat(buttons): reskin v1 with v2 design + soft labels + v2 polish #6061 (Button.tsx defaults `iconPosition = Left`).
  • `onUnfollowTag` in `useFollowPostTags` — the consolidated branch added it then reverted in `fix(tags): drop unfollow ×`. Final TagChip has no `onUnfollow` prop, so the hook ships unchanged.

Test plan

  • Visit `/tags` directory — chips render at `md` density with follow `+` button on unfollowed tags, plain bordered chip on followed.
  • Open any article post — `#tag` list at the top renders `TagChip` at `sm`.
  • Sponsored tag (engagement ad) — branded variant still renders correctly.
  • Profile page cover edit pen — confirm Float variant is now applied.
  • Sidebar collapse arrow — confirm 16 px icon, not 20 px.
  • Any feed card "Read article" button — `OpenLinkIcon` is outlined.
  • Storybook `Atoms/TagChip` story renders all sizes and states.

Made with Cursor

Preview domain

https://feat-buttons-v2-small-fixes.preview.app.daily.dev

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 17, 2026 9:36am
storybook Error Error May 17, 2026 9:36am

Request Review

tsahimatsliah and others added 2 commits May 17, 2026 12:27
Layered on top of #6061 (V1 reskin). Five independent, low-risk
follow-ups that the reskin alone doesn't deliver:

1. **TagChip rollout** — adopt the unified `TagChip` primitive
   (already in #6061) on its two production call sites:
   - Article post / modal tag list now renders `TagChip` at size `sm`
     (passes through to `BrandedTagChip` when an engagement-ad tag is
     in the list, preserving the existing ads-aware variant).
   - Tags directory page (`/tags`) renders `TagChip` at size `md` with
     follow affordance wired through `useTagAndSource`.
   - New `Atoms/TagChip` Storybook story with size + state matrix.

2. **ProfileHeader edit-cover button** — fix typo where the Float
   variant was passed via `type=` instead of `variant=`, so the prop
   was silently ignored and the button rendered as default. (1 line)

3. **SidebarMenuIcon expand toggle** — pin icon to `IconSize.Size16`.
   The default XSmall-button icon is 20 px after the reskin, which
   reads oversized inside the 24 px collapse-hairline button. (1 prop)

4. **ReadArticleButton** — drop `secondary` modifier on `OpenLinkIcon`
   so the outlined glyph renders instead of the filled variant. (2 props)

5. **Strict typecheck skip list** — add `ProfileHeader.tsx` and
   `tags/index.tsx` to the buttons-v2 strict-skip set. Both files
   carry pre-existing strict violations on unrelated lines
   (`user.companies` optionality on ProfileHeader; reduce accumulator
   typed as `never[]` on the tags directory) that should be addressed
   in a dedicated cleanup PR.

Note: the original consolidated branch also added an `onUnfollowTag`
plumbing path through `useFollowPostTags`, but the followup
`fix(tags): drop unfollow ×` commit reverted the inline unfollow
behaviour. Final TagChip API has no `onUnfollow` prop, so this PR
ships the hook unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
…skips

- `/tags` directory drops the inline follow CTA (no `onFollow`,
  removes the unused `useTagAndSource` import). Chips stay as
  link-only labels — matches the on-main behavior; `isFollowed`
  still drives bordered-vs-filled treatment so logged-in users
  scan their tags at a glance.

- `TagChip` truncates long labels in-place (`min-w-0 truncate` on
  the label, `max-w-full` on the chip) and pins the separator +
  `+` button with `shrink-0` so they never get pushed off-screen
  by an over-long tag value.

- Fix the underlying strict-mode errors in `pages/tags/index.tsx`
  (typed reduce accumulators) and `ProfileHeader.tsx` (`!!length`
  guard) and remove both files from the strict-skip list so
  future regressions surface instead of getting silently allowed.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant