fix(admin): restore broken table styling after focused-modules refactor #12
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/admin-table-styling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The admin page has looked visually broken for several weeks. The root cause is the
c7eeaf6refactor that split the monolithicAdminPage.vueinto focused sub-components (AdminStatsBar,AdminOrdersTable,AdminOrderDetailPanel,AdminOrderMessageModal) but left all their CSS inAdminPage.vue's<style scoped>block. Vue 3 scoped styles only apply to the parent's own template elements; they do not penetrate child components (especially the multi-root/fragment components created by the refactor). As a result, every table row, stat button, status select, expand icon, and detail panel lost its styling.Approach
The minimal fix is to remove the
scopedattribute from the<style>block inAdminPage.vue. All selectors are BEM-namespaced under.admin__*, so making them global is safe and does not leak styles to other parts of the app.An alternative would be to move each component's styles into its own
<style scoped>block, which is more idiomatic but touches 4–5 files and ~500 lines. This one-line change achieves the same visual result with minimal risk.Changes
frontend/src/pages/AdminPage.vue— changed<style scoped>to<style>.Compatibility / risk
Very low. The BEM namespace ensures the global styles only apply to admin elements. No JavaScript or backend logic is changed.
Test plan
npm run lint)npm run test, 267/267)npm run build)docker compose -f docker-compose.e2e.yml up --build ..., 92/92)Verification
Ran the full E2E suite in Docker against the branch. All 92 Playwright tests passed, including the admin dashboard and fulfillment flows that render the table, status dropdowns, expand/collapse panels, and tracking UI.