-
Notifications
You must be signed in to change notification settings - Fork 1
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
RadioGroup #25
base: master
Are you sure you want to change the base?
RadioGroup #25
Conversation
…omponent-library into update-packaging
</label> | ||
{errMessage ? ( | ||
<div | ||
className={styles.errorMessage} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: Can we detext if there is a link in the label to add a warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I'm done for now. The library is looking great. 👍 Only minor comments or questions
@@ -0,0 +1,16 @@ | |||
import React, { forwardRef } from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: Do we still need the React import here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -0,0 +1,16 @@ | |||
import React from "react"; | |||
import { describe, it, expect, afterEach } from "vitest"; | |||
import { render, cleanup, screen } from "@testing-library/react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAND: screen
is not being used here but probably useful to leave in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that was the thought
with: | ||
node-version: "16" | ||
|
||
- name: Install dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: Should there be a query to check the branch is up-to-date with master
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a start, Ben is doing the rest
@@ -0,0 +1,3 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: I thought this file type was in the gitignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the gitignore because I wanted to suggest some extensions
<AerAccordion.Root {...args}> | ||
<AerAccordion.Item value="item-1"> | ||
<AerAccordion.Header>Header 1</AerAccordion.Header> | ||
<AerAccordion.Content> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAND: It would be nice to show a default expanded state on one of these.
/** A button to trigger the alert dialog to open */ | ||
trigger: ReactElement<HTMLButtonElement>; | ||
/** The title and whether to hide it (this defaults to `false`). NOTE: This is placed in an `<h2>`. */ | ||
dialogTitle: string | ReactElement<unknown> | HideableTextShape; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: Why is this required if it can be hidden an it's not in the HideableTextShape? I'm unsure what elementIsHideableTextShape
is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required because the title is required to make the alert accessible. Nevertheless you may visually hide the title. The is elementIsHideableTextShape
is just a type gaurd to allow easy checks
</AerAlertDialog.Root>, | ||
); | ||
|
||
await userEvent.click( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAND: I don't think this await is doing anything here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. The latest version of userEvent is all async
@@ -0,0 +1,125 @@ | |||
// Vitest Snapshot v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAND: 1 obsolete snapshot here
expect(screen.queryByRole("status")).toBeFalsy(); | ||
expect(onBlurMock).not.toHaveBeenCalled(); | ||
|
||
await userEvent.click(checkbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAND: This and other awaits
can be removed in these tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no they can't
export interface AerCheckboxProps | ||
extends Omit<DefaultProps<"input">, "checked"> { | ||
// Required label for the checkbox. NOTE: you can hide the label using the `LabelProps` API, but must provide a label to make the field accessible | ||
label: string | ReactElement | LabelProps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QUERY: I feel that rather than relying on the dev to pass a correctly implemented label, that we define it within the component so it will always be there..?
No description provided.