apps/sample-vue-full: fully revamp to new design with Ant Design - #383
Open
Galuh80 wants to merge 9 commits into
Open
apps/sample-vue-full: fully revamp to new design with Ant Design#383Galuh80 wants to merge 9 commits into
Galuh80 wants to merge 9 commits into
Conversation
… reusable components and ADV layout
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Pull Request Checklist
Summary
Redesign and improve the
sample-vue-fullfrontend: fix broken imports, split the secure layout into reusable components, redesign the sign-in page and dashboard, add web component wrappers, refactor all Demo, Visuals, Data Entry, and T4t views with reusable ADV components, and fix Biome and SonarCloud issues.What is being improved and why:
The existing
sample-vue-fullapp had several issues that made it hard to use as a reference template: broken@common/*import paths that prevented Vite from starting, placeholder CSS that poisoned all text colors, a bare login page with no real layout, a dashboard made entirely of skeleton loaders, monolithic layout files with no component separation, and Demo/Visuals/DataEntry views with raw HTML elements and no Ant Design structure. These changes address all of that — the goal is forsample-vue-fullto serve as a genuinely usable reference for teams starting new apps from this template.Changes by area:
Imports & build:
../common/*imports — replaced with proper@common/vue,@common/iso,@common/webpackage namesresolve.aliasfor all@common/*packages to ensure reliable resolution regardless of npm workspace hoistingVITE_INITIAL_SECURE_PATHandVITE_INITIAL_PUBLIC_PATHenv vars that caused silent login failure (router.push(undefined))./fetch.jsimport incommon/vanilla/web/t4t-fe.js— corrected to../iso/fetch.jsdev:mockedscript (--config apps/vite.config.jspath didn't exist) — corrected to use localvite.config.js/api→http://127.0.0.1:3000) fordevelopmentmode so T4t pages work without changing the API URL env varFonts & styling:
FrauncesandDM Sansvia@fontsourcepackages to eliminate Google Fonts CDN dependency and fix SonarCloud SRI warning* { color: darkgreen }global CSS with a proper resetFrauncesserif usage withDM Sansfor a consistent, modern UISign-in page:
a-input,a-button,a-checkboxfrom Ant Design Vue with:deep()overrides for consistent focus/hover stylingSecure layout — split into reusable components:
AppSidebar.vue— dark navy sidebar, collapsible withbreakpoint="md", brand via props,a-menunavigation, mobile overlay with backdrop; all app-specific data injected via propsAppHeader.vue— sticky header witha-buttontoggle,a-inputsearch (toggle on click),a-popover+a-listfor chat and notifications,a-divider,a-avatar+a-dropdownfor user menu; data received via props, mutations emitted as eventsAppFooter.vue— minimal footer withbrandpropDashboard:
StatCard.vue(reusable) —a-statisticinsidea-cardwith trend icon, footer text, hover lift animation; fully prop-drivenMemberCard.vue(reusable) —a-card+a-avatar+a-tagwith visible border and hover shadowa-list+a-typography-paragraphwith expandable ellipsis), Useful Links (a-listwith icons), Announcements (a-timelinewith type tags and unread badge)Web component wrappers:
WebCamCapture.vue(reusable) — wrapsvcxwc-web-camwitha-card, live status indicator, snapshot grid with download/delete, snap logSignaturePad.vue(reusable) — wrapsvcxwc-sign-padwitha-card, signed/empty tag, save and clear actions, preview viaa-image; fullv-modelsupport and configurable stroke/background propsDemo views — reusable components and ADV layout:
ColorBox.vue(reusable) — 80×80 colored box with hover lift animation, replaces inline-styled divsDemoTest.vue— reorganised into 4a-cardsections (Template Refs, Counter & Store, Object Reactivity, API & MSW Tests); raw<button>and<div>elements replaced witha-button,a-tag,a-space,a-divider; API response now displayed inline instead ofconsole.logonlyDemoSignPad.vue— usesSignaturePad.vuereusable component with two instances (Full Signature and Initials), shared signature log viaa-listDemoWebCam.vue— usesWebCamCapture.vuereusable component with snap log viaa-listFiller.vue— redesigned witha-cardwrapper,a-descriptionsfor route info, and responsive grid list (a-list+a-cardgrid) for 50-item scroll testVisuals views — reusable components and ADV layout:
ChartCard.vue(reusable) — wraps Chart.js canvas ina-cardwith title icon,#extraslot for controls (radio group, select), and reactive chart rebuild viawatchDemoChart1.vue— redesigned with 4a-statisticsummary cards, bar chart with Q1–Q4a-radio-groupswitcher, doughnut chart (category split), and line chart with yeara-select; all icons passed throughmarkRawto satisfy BiomeLeafletMap.vue(reusable) — wraps Leaflet with fix for Vite marker icon resolution (L.Icon.Default.mergeOptions), props forcenter,zoom,markers[], andtileLayer; emitsmap-clickandmarker-click; exposesflyTomethod viadefineExposeDemoLeaflet.vue— redesigned with tile layer switcher (a-radio-group: Street / Topo / Dark), location list (a-list+a-avatar+a-tag), click-to-fly-to behavior, selected location detail viaa-descriptions, and Add Locationa-modalwith form (a-input,a-input-number,a-switch)Data Entry views — ADV layout:
DemoForm.vue— redesigned with 2-column card-grid: Various Inputs card (slider, date-picker, switch, checkbox-group, radio-group, textarea, store counter) + Transfer card on the left; File Upload, WebSocket, and Error Pages cards on the right; all submit buttons have:loadingstateDemoCard.vue— full ADV card showcase across 7 sections: Basic Cards, Cover Cards (gradient CSS +a-card-meta), Statistic Cards, Tabbed Card (a-tabs+a-list), Inner Cards (a-card type="inner"+a-progress), Loading State (a-skeleton+a-switchtoggle), and Quick Entry FormDemoCascade.vue— redesigned with 2-column layout: cascade form (Region multi-select → Countries multi-select) on the left; live Selection Summary (per-region breakdown witha-badge+a-tag) and Stats (a-statistic×3) on the rightDemoCascade2.vue— redesigned with 2-column layout: continent/country/state checkboxes with indeterminate support and Force Include/Exclude filters on the left; Stats card +a-treeselection hierarchy + Force Filters summary on the right; fixed typoforceExlcudes→forceExcludesand emptyonCheckAllChangeExcludesDemoCascade2Api.vue— redesigned as API-driven version with per-sectiona-spinloading states,a-badgeAPI status indicator,a-alertfor errors, anda-timelineshowing GET endpoint detailsT4t CRUD view:
T4t.vue— redesigned witha-cardwrapper (table display name + record count badge in title), all toolbar actions (Reload, Filter, Create, Delete, Import, Export, Back) moved to#extrawith proper ADV button types and icons; filter drawer uses#footerslot with Add Filter / Clear All / Apply; form drawer uses#footerslot with Cancel / Save Changes;a-emptyshown when no filters added/t4t-student) to grouped depth-3 (/t4t/student,/t4t/subject,/t4t/audit-logs) so they appear as a T4t submenu group in the sidebarGET /api/t4t/config/:tableandGET /api/t4t/find/:table— student (3 records), subject (4 records), audit_logs (2 records) — so the T4t pages work fully indev:mockedmode without a backendQuality fixes:
noUnusedImportswarnings for Vue template imports — usedmarkRaw/computed pattern where possible,biome-ignorefor unavoidable casesrgbahover backgrounds with solid equivalents so SonarCloud can compute contrast against the actual dark background; corrected text colors to meet WCAG AA 4.5:1LeafletMap.vue— extracted inner expression to a variable before use.stat-icon-wrapCSS selectorAffected Area
Validation