Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[project] allow auto-injecting styles + add CSS property prefix #182

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

Alchez
Copy link
Collaborator

@Alchez Alchez commented Nov 5, 2024

Required for https://github.com/agritheory/fab/pull/32.


Changes:

  • Auto-import package styles for the following projects: AForm, ATable and Beam. This allows users to import components without explicitly needing to import its styles. It uses the vite-plugin-lib-inject-css dependency.
  • Prefix all :root-level custom CSS properties with sc to avoid name collision in other projects, like Frappe. I don't see any side-effects because of this, but maybe @agritheory and @crabinak can give it a sanity check as well?

@Alchez Alchez requested review from agritheory and crabinak November 5, 2024 11:54
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Coverage Report for ./atable

Status Category Percentage Covered / Total
🔴 Lines 67.33% (🎯 70%) 134 / 199
🔴 Statements 68.09% (🎯 70%) 143 / 210
🟢 Functions 76.74% (🎯 70%) 33 / 43
🔴 Branches 45.67% (🎯 70%) 74 / 162
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
atable/src/components/ATable.vue 51.92% 32.5% 88.88% 51.02% 107-111, 117-145, 203-204
Unchanged Files
atable/src/utils.ts 100% 100% 100% 100%
atable/src/components/ACell.vue 93.54% 57.77% 100% 93.54% 88, 112, 134-137, 180
atable/src/components/AExpansionRow.vue 0% 0% 0% 0% 33-3
atable/src/components/ARow.vue 66.66% 56% 71.42% 63.63% 56, 63, 67, 71-85, 17
atable/src/components/ATableHeader.vue 100% 50% 100% 100%
atable/src/components/ATableModal.vue 50% 100% 0% 50% 29
atable/src/components/index.ts 65.9% 50% 66.66% 66.66% 46-47, 60, 83-84, 103-114
Generated in workflow #391 for commit cdf562a by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Coverage Report for ./beam

Status Category Percentage Covered / Total
🔴 Lines 9.72% (🎯 70%) 7 / 72
🔴 Statements 10.38% (🎯 70%) 8 / 77
🔴 Functions 4.76% (🎯 70%) 1 / 21
🔴 Branches 0% (🎯 70%) 0 / 53
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Unchanged Files
beam/src/components/ActionFooter.vue 0% 100% 0% 0% 12-3
beam/src/components/BeamArrow.vue 0% 0% 100% 0% 2-4
beam/src/components/BeamMetadata.vue 0% 0% 0% 0% 2-1
beam/src/components/BeamModal.vue 0% 0% 0% 0% 3-5
beam/src/components/BeamModalOutlet.vue 0% 100% 100% 0% 2
beam/src/components/BeamProgress.vue 0% 0% 0% 0% 10-3
beam/src/components/Confirm.vue 0% 0% 0% 0% 4-5
beam/src/components/ItemCheck.vue 0% 0% 0% 0% 9-3
beam/src/components/ItemCount.vue 0% 0% 0% 0% 18-1
beam/src/components/ListAnchor.vue 0% 100% 100% 0% 1
beam/src/components/ListItem.vue 0% 0% 0% 0% 37-14
beam/src/components/ListView.vue 0% 0% 0% 0% 36-null
beam/src/components/Navbar.vue 0% 0% 0% 0% 13-null
beam/src/components/ScanInput.vue 88.88% 100% 50% 87.5% 23
beam/src/components/SplitColumn.vue 0% 0% 100% 0% 14-8
Generated in workflow #391 for commit cdf562a by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Coverage Report for ./aform

Status Category Percentage Covered / Total
🟢 Lines 87.01% (🎯 70%) 201 / 231
🟢 Statements 86.44% (🎯 70%) 204 / 236
🟢 Functions 80.76% (🎯 70%) 42 / 52
🔴 Branches 68.8% (🎯 70%) 75 / 109
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
aform/src/components/AForm.vue 90% 40% 85.71% 90% 40-41
aform/src/components/form/ADate.vue 85.71% 50% 100% 85.71% 38
aform/src/components/form/ADatePicker.vue 96.61% 90.9% 92.85% 96.49% 66, 28
aform/src/components/form/ADropdown.vue 91.48% 76.92% 84.61% 91.48% 55, 84-85, 93
aform/src/components/form/AFieldset.vue 87.5% 100% 50% 87.5% 8
Unchanged Files
aform/src/components/base/CollapseButton.vue 100% 100% 100% 100%
aform/src/components/form/ACheckbox.vue 100% 100% 100% 100%
aform/src/components/form/AComboBox.vue 0% 0% 100% 0% 2-1
aform/src/components/form/AFileAttach.vue 0% 0% 0% 0% 26-17
aform/src/components/form/ANumericInput.vue 100% 100% 100% 100%
aform/src/components/form/ATextInput.vue 100% 100% 100% 100%
aform/src/components/utilities/Login.vue 87.5% 88.88% 100% 87.5% 76-78
aform/src/directives/mask.ts 84.09% 59.09% 100% 83.72% 33-34, 41, 50, 65, 98, 103
Generated in workflow #391 for commit cdf562a by the Vitest Coverage Report Action

@Alchez Alchez force-pushed the feat-auto-inject-css branch from d543eed to cdf562a Compare November 5, 2024 11:58
@Alchez Alchez changed the title [project] allow auto-injecting atable styles [project] allow auto-injecting styles + add CSS property prefix Nov 5, 2024
@agritheory agritheory merged commit 9ae1bc5 into development Nov 5, 2024
4 of 7 checks passed
@Alchez Alchez deleted the feat-auto-inject-css branch November 19, 2024 09:43
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.

2 participants