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

Button component #711

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open

Conversation

dzonidoo
Copy link
Contributor

NHUB-464

Checklist

  • This pull request is not adding new forms that use redux
  • This pull request is adding missing TypeScript types to modified code segments where it's easy to do so with confidence
  • This pull request is replacing lodash.get with optional chaining for modified code segments

@petrjasek petrjasek added this to the v2.6 milestone Dec 22, 2023
@dzonidoo dzonidoo requested review from MarkLark86, petrjasek and thecalcc and removed request for petrjasek, MarkLark86 and thecalcc January 4, 2024 10:35
@dzonidoo dzonidoo changed the title Create a Button component and replace old button instances with the newly created component Button component Jan 11, 2024
@petrjasek petrjasek modified the milestones: v2.6, v2.7 Jan 15, 2024
@petrjasek
Copy link
Member

hi @dzonidoo can you update the PR so we can merge it?

@petrjasek petrjasek changed the base branch from develop to new-components April 10, 2024 11:26
@petrjasek petrjasek modified the milestones: v2.7, v2.8 May 8, 2024
fritzSF and others added 3 commits August 21, 2024 12:59
@petrjasek petrjasek removed this from the v2.8 milestone Aug 22, 2024
@dzonidoo dzonidoo changed the base branch from new-components to develop September 5, 2024 11:30
@petrjasek petrjasek added this to the v2.9 milestone Sep 6, 2024
@petrjasek petrjasek modified the milestones: v2.9, v3.0 Jan 22, 2025
@dzonidoo dzonidoo requested a review from petrjasek January 30, 2025 11:04
}

interface IPropsReset extends IPropsButtonBase {
type?: 'reset',
Copy link
Member

Choose a reason for hiding this comment

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

I guess here the type must be reset so should be probably just type: 'reset',
I'm also wondering if we have a usecase where we wouldn't use it with onClick, might be better to make it mandatory if not to get this checked.
same applies to submit


interface IPropsSubmit extends IPropsButtonBase {
type: 'submit',
onClick?(event: React.MouseEvent<HTMLButtonElement, MouseEvent>): void;
Copy link
Member

Choose a reason for hiding this comment

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

I would still make this mandatory, if we need to put there empty function in case this is not needed it's probably better than forgetting it when it's needed. same goes for reset button

import {IconButton, IPropsSize, IPropsVariant} from './IconButton';

interface IProps {
testId?: string,
Copy link
Member

Choose a reason for hiding this comment

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

I see this is data-test-id on other components, would be good to make it consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so change the name?

Copy link
Member

Choose a reason for hiding this comment

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

yes

action={action}
isVisited={action.visited && action.visited(this.props.user, this.props.item)}
Copy link
Member

Choose a reason for hiding this comment

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

why are we dropping this functionality?

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.

3 participants