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(link): add link component #972

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

Conversation

erbilnas
Copy link
Collaborator

Closes #906

  • No breaking changes
  • New component

export { default as BlTableCell } from "./components/table/table-cell/bl-table-cell";
export { default as BlSplitButton } from "./components/split-button/bl-split-button";
export { default as BlCalendar } from "./components/calendar/bl-calendar";
export { default as BlDatePicker } from "./components/datepicker/bl-datepicker";
Copy link
Member

Choose a reason for hiding this comment

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

why did we change casing? that could be a breaking change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's breaking tests and btw it already named like that
export default class BlDatepicker extends DatepickerCalendarMixin {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should talk with @dilandoogan

* Target URL for the link
*/
@property({ type: String, reflect: true })
target = "";
Copy link
Member

Choose a reason for hiding this comment

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

add type safety, we can inherit from anchor's types

Copy link
Member

Choose a reason for hiding this comment

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

don't add them by hand as much as possible, there are examples of inheriting existing types from elements

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The target here is not the anchor type but the href. I want to give it a more meaningful name

* Whether the link is external
*/
@property({ type: Boolean, reflect: true })
external = false;
Copy link
Member

Choose a reason for hiding this comment

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

do we need an external attribute here? adding an icon feels outside the boundaries of our design system, more like an UI kit addition

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's nice to see an icon for external sites to show people they will leave I think, let's discuss

* Whether the link is disabled
*/
@property({ type: Boolean, reflect: true })
disabled = false;
Copy link
Member

@AykutSarac AykutSarac Dec 25, 2024

Choose a reason for hiding this comment

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

links shouldn't have a disabled state, they are not buttons

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should discuss

Comment on lines 152 to 153
@click="${this.handleClick}"
@keydown="${this.handleKeyDown}"
Copy link
Member

Choose a reason for hiding this comment

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

do we need to handle them specifically, doesn't browser do it for us natively?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I structured it this way in case we wanted to add event handling in the future, but you’re right we can remove it for now

Copy link
Member

Choose a reason for hiding this comment

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

are you possibly referring to the conversation above?
here I meant adding the other required attributes such as rel etc.

@erbilnas erbilnas requested a review from AykutSarac December 26, 2024 15:50
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.

Link Component
3 participants