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

Size config rework (#3333) #4246

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open

Conversation

Fsss126
Copy link
Contributor

@Fsss126 Fsss126 commented Apr 30, 2024

closes #3333

Description

Introduced sizes config with ability to override component CSS variables per size.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

@m0ksem
Copy link
Collaborator

m0ksem commented Apr 30, 2024

VaButton: {
    color: '#fff',
    cssVariables: {
       padding: '8px'
    }
}

@m0ksem
Copy link
Collaborator

m0ksem commented Apr 30, 2024

preset="['secondary', 'small']"

@m0ksem m0ksem marked this pull request as draft April 30, 2024 12:58
@m0ksem m0ksem self-requested a review April 30, 2024 12:58
@Fsss126 Fsss126 marked this pull request as ready for review May 2, 2024 01:39
@@ -19,6 +20,7 @@ const packageJSON = JSON.parse(readFileSync(resolver(process.cwd(), './package.j
const dependencies = [...Object.keys(packageJSON.dependencies), ...Object.keys(packageJSON.peerDependencies)]

Copy link
Collaborator

Choose a reason for hiding this comment

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

What's wrong here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolving @ import aliases didn't work for web components build build even though it was set up in tsconfig and other builds so I fixed it. But it turned out that other packages that import directly from ui/src fail to resolve @ so I guess using absolute imports is not supported at the moment

packages/ui/src/components/va-config/VaConfig.vue Outdated Show resolved Hide resolved
export { defaultSizes as sizes, DefaultSizes as Sizes } from '../../composables'

export const variables = [
'position',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Position seems to be useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was in the variables that were defined so I added keys for all of the current variables.

packages/ui/src/composables/useValidation.ts Outdated Show resolved Hide resolved
packages/ui/src/services/component-config/theme/index.ts Outdated Show resolved Hide resolved
@m0ksem m0ksem changed the base branch from develop to next May 3, 2024 03:37
@Fsss126 Fsss126 changed the title Size config rework (#3333) Size config rework (closes #3333) May 6, 2024
@Fsss126 Fsss126 changed the title Size config rework (closes #3333) Size config rework (#3333) May 6, 2024
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