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

feat(web-core): new VtsLink component #8000

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ByScripts
Copy link
Contributor

Description

New VtsLink component (Design System)

VtsLink Light

VtsLink Dark

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@@ -0,0 +1,137 @@
<template>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The component's version is missing:

Suggested change
<template>
<!-- v1 -->
<template>

@@ -0,0 +1,137 @@
<template>
<component :is="component" :class="classes" class="vts-link" v-bind="attributes">
<UiIcon :icon="icon" color="current" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the icon component has been updated to VtsIcon, what do you think of rebasing this PR and using the new version of the icon component?

Suggested change
<UiIcon :icon="icon" color="current" />
<VtsIcon :icon color="current" />

Comment on lines +34 to +35
small: 'typo p3-regular',
medium: 'typo p1-regular',
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the typography styles, there is a -underline variant, what do you think of using it? This would avoid adding the text-decoration CSS property and match the typography used in the design system:

Suggested change
small: 'typo p3-regular',
medium: 'typo p1-regular',
small: 'typo p3-regular-underline',
medium: 'typo p1-regular-underline',

align-items: center;
gap: 0.8rem;
color: var(--vts-link--color);
text-decoration: underline;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not needed if using the -underline typography variants:

Suggested change
text-decoration: underline;

<VtsLink v-bind="properties">This is a link</VtsLink>

<div v-if="!properties.to && !properties.href" class="info">
<UiIcon :icon="faInfoCircle" color="normal" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as in VtsLink component, after a rebase, the icon component could be updated to VtsIcon and the color prop to 'brand':

Suggested change
<UiIcon :icon="faInfoCircle" color="normal" />
<VtsIcon :icon="faInfoCircle" color="brand" />

Link is disabled because no `href` or `to` is provided
</div>
<div v-else-if="properties.to && properties.href" class="info">
<UiIcon :icon="faExclamationTriangle" color="warning" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here:

Suggested change
<UiIcon :icon="faExclamationTriangle" color="warning" />
<VtsIcon :icon="faExclamationTriangle" color="warning" />

<component :is="component" :class="classes" class="vts-link" v-bind="attributes">
<UiIcon :icon="icon" color="current" />
<slot />
<UiIcon
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here:

Suggested change
<UiIcon
<VtsIcon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants