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

RadioGroup #25

Open
wants to merge 81 commits into
base: master
Choose a base branch
from
Open

RadioGroup #25

wants to merge 81 commits into from

Conversation

S-unya
Copy link
Member

@S-unya S-unya commented Dec 9, 2022

No description provided.

</label>
{errMessage ? (
<div
className={styles.errorMessage}
Copy link
Member Author

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?

@S-unya S-unya marked this pull request as ready for review December 12, 2022 13:17
Copy link

@JackWP1 JackWP1 left a 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";
Copy link

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?

Copy link
Member Author

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";
Copy link

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

Copy link
Member Author

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
Copy link

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?

Copy link
Member Author

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 @@
{
Copy link

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?

Copy link
Member Author

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>
Copy link

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;
Copy link

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?

Copy link
Member Author

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(
Copy link

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

Copy link
Member Author

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
Copy link

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);
Copy link

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

Copy link
Member Author

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;
Copy link

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..?

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