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

refactor(frontend): Extract Button that represents Done action #2765

Conversation

AntonioVentilii-DFINITY
Copy link
Collaborator

Motivation

Another step to reduce duplication and concentrate components in one place: we extract the button the is used as "Done".

NOTE: The button is always at full width.

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY requested a review from a team as a code owner October 9, 2024 16:57
import Button from '$lib/components/ui/Button.svelte';
import { i18n } from '$lib/stores/i18n.store';
export let type: 'submit' | 'reset' | 'button' = 'submit';
Copy link
Member

Choose a reason for hiding this comment

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

Is it really ever used to submit a form? If not, should we also set it as button for all use case?

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 didn't want to change the logic to be honest, just in case it is needed as submit somewhere.

But it make sense that "Done" does not submit a form.

I double checked and it is really never used in a form, you are right! Changed

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense. THx

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

LGTM, thx

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY merged commit 8fcc8f5 into main Oct 9, 2024
9 checks passed
@AntonioVentilii-DFINITY AntonioVentilii-DFINITY deleted the refactor(frontend)/Extract-Button-that-represents-Done-action branch October 9, 2024 17:25
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