Skip to content

cycle 78 - #1257

Merged
kewcoder merged 21 commits into
mainfrom
development
May 19, 2026
Merged

cycle 78#1257
kewcoder merged 21 commits into
mainfrom
development

Conversation

@kewcoder

@kewcoder kewcoder commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by cubic

Adds an expanding variant to AdditionalContent with a desktop show-more grid and a mobile slide-in details panel. Also fixes the PageTitle secondary button dropdown and resolves a DataTable tab/filter sync issue.

  • New Features

    • @orchidui/core AdditionalContent: new expanding variant with expandingItems, expandingInitialCount, and expandingColumns; optional CustomerCard; auto colSpan fill for the last cell; desktop show more/less; mobile drawer.
    • Added OcExpandingType.vue and MobileExpandingType.vue, wired via OcAdditionalContent.vue; Storybook moved to a Playground with focused examples (Default, Dynamic, Balance, Expanding, ExpandingCustomerInfo) and code snippets.
  • Bug Fixes

    • PageTitle secondary button: dropdown opens only from the additional-area icon; main button still calls onClick; OcButton.vue now emits addition-click with the event payload.
    • Expanding grid: fixed borders, z-index, and spacing for the show-more control; improved mobile drawer open/close and tap targets.
    • Dashboard text editor: corrected .has-error styles by flattening nested selectors in snow.css.
    • DataTable: synced tabs with form filters when they represent the same value (e.g., tabs.filter_name = 'statuses'); improved clearAllFilters to respect the active tab; Storybook adds a statuses Select filter example.

Written for commit 7fa3439. Summary will update on new commits. Review in cubic

HoaiLee and others added 13 commits April 28, 2026 10:40
PageTitle: fix page title button dropdown
…ataTable

- Add OcExpandingType.vue — reusable flat-grid with show-more/show-less toggle and optional CustomerCard, extracted from hitpay ExpandingTransactionDetails
- Add expanding variant to OcAdditionalContent.vue with expandingItems, expandingInitialCount, expandingColumns props
- Restructure stories with Playground + per-story description/highlights/code pattern matching DataTable
- Add examples/ folder with Default, Dynamic, Balance, Expanding example files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add MobileExpandingType with slide-from-right details panel
- Auto-expand last item to fill incomplete grid row, respecting manual colSpan
- Add ExpandingCustomerInfo story example
- Fix show more button mobile clickability with z-10 and mb-8 spacing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
orchid Ready Ready Preview, Comment May 18, 2026 8:36am

Request Review

@kewcoder
kewcoder requested review from HoaiLee and spacemonkey92 May 6, 2026 07:09

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 16 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/core/src/Elements/PageTitle/OcPageTitleRight.vue">

<violation number="1" location="packages/core/src/Elements/PageTitle/OcPageTitleRight.vue:21">
P2: Forward the click event to `secondaryButtonProps.onAdditionClick`. The Button emits `addition-click` with the event payload, so calling the handler with no args breaks handlers that rely on the event object.</violation>
</file>

<file name="packages/core/src/Elements/AdditionalContent/ExpandingType/OcExpandingType.vue">

<violation number="1" location="packages/core/src/Elements/AdditionalContent/ExpandingType/OcExpandingType.vue:84">
P2: `grid-cols-${columns}` is built dynamically, so Tailwind won’t generate the class and the grid column styling can be missing in production. Map columns to static class names or use inline `gridTemplateColumns` instead.</violation>
</file>

<file name="packages/core/src/Elements/AdditionalContent/ExpandingType/MobileExpandingType.vue">

<violation number="1" location="packages/core/src/Elements/AdditionalContent/ExpandingType/MobileExpandingType.vue:58">
P2: Avoid interpolating Tailwind utility class names; `grid-cols-${columns}` can be omitted from the built CSS and break the layout.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread packages/core/src/Elements/PageTitle/OcPageTitleRight.vue Outdated
Comment thread packages/core/src/Elements/AdditionalContent/ExpandingType/OcExpandingType.vue Outdated
@mykhailo-diakovych

Copy link
Copy Markdown
Contributor

Reviewed cycle 78. Big picture looks good — clean variant addition, nice story restructuring with code snippets. A few things worth addressing:

1. (Important) Same Tailwind dynamic-class bug, but on desktop — not fixed

PR #1258 fixes grid-cols-${columns} only in MobileExpandingType.vue. The desktop component has the same broken pattern at OcExpandingType.vue:306:

<div :class="[`grid grid-cols-${columns}`, hasMore ? 'md:mb-0' : '']">

Tailwind JIT can't see interpolated classes → purged from build → desktop grid won't render columns correctly either. This needs the same fix as #1258 (object map with grid-cols-1..grid-cols-4). Otherwise the desktop view of the new expanding variant is broken on initial release.

2. OcButton.vue:42 — emit declaration out of sync with payload

After this PR addition-click is emitted with $event, but the declaration is still:

defineEmits({ 'addition-click': [] })

Should be 'addition-click': [Event] (or [MouseEvent]) so consumers get correct typing/runtime validation.

3. OcPageTitleRight.vue — inconsistent event forwarding

  • clickSecondaryButton(e) forwards e to secondaryButtonProps.onClick(e)
  • clickAdditional(e) calls secondaryButtonProps.onAdditionClick() without the event ❌

Since the whole point of changing OcButton to emit $event was to give consumers the event, the wrapper should forward it too:

secondaryButtonProps['onAdditionClick'](e)

Also: code style — mixing ; with the rest of the codebase (no semicolons elsewhere in the file), and typeof x === 'function' && x() for side-effects reads worse than a plain if.

4. Mobile ignores expandingInitialCount

On mobile, previewItems = items.slice(0, columns) — so the preview is bound to columns (default 3), not initialCount (default 6). A user setting expanding-initial-count="6" will see 6 on desktop but 3 on mobile with no obvious reason. Either rename the mobile slice to use initialCount, or document this divergence in the prop description.

5. Mixed import paths in examples

  • examples/Default.vue, Dynamic.vue, Balance.vuefrom '@orchidui/core'
  • examples/Expanding.vue, ExpandingCustomerInfo.vuefrom '@/orchidui-core'

Pick one. Since these are user-facing snippets shown via ?raw in storybook, the public package name (@orchidui/core) is probably what we want everywhere — the internal alias would be confusing for someone copying the snippet.

6. Duplicated logic between desktop/mobile

getBorderClasses and getEffectiveColSpan are virtually identical in OcExpandingType.vue and MobileExpandingType.vue. Not blocking, but worth extracting to a small composable to avoid drift.

Otherwise ✅

  • snow.css flatten of .has-error nested selectors — correct fix (it's plain CSS, nesting wasn't being parsed).
  • PageTitle dropdown behavior split (primary click vs additional area) is a reasonable model.
  • Storybook restructure (Playground + focused stories with ?raw code) is a nice DX improvement.
  • Version bumps 1.88 → 1.92 are consistent across both packages.

Worth at least addressing #1 before merge — it ships the new variant in a broken state on desktop.

@kewcoder

kewcoder commented May 7, 2026

Copy link
Copy Markdown
Collaborator Author

HoaiLee and others added 2 commits May 18, 2026 14:18
@kewcoder
kewcoder merged commit b13fec5 into main May 19, 2026
2 of 3 checks passed
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.

3 participants