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(promts): skeleton UI for promts #5726

Merged
merged 8 commits into from
Dec 16, 2024
Merged

Conversation

mikeldking
Copy link
Contributor

@mikeldking mikeldking commented Dec 12, 2024

resolves #5725

Adds rudimentary listing of Prompts

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 12, 2024
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 12, 2024
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Dec 13, 2024
Comment on lines 118 to 128
<div
{...{
className: header.column.getCanSort()
? "cursor-pointer"
: "",
onClick: header.column.getToggleSortingHandler(),
style: {
textAlign: header.column.columnDef.meta?.textAlign,
},
}}
>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not unstyled button? Makes it tab-navigable and more accessible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point - these come from the tanstack examples - which tend to be div soup. In general I agree with you and don't know the exact rationale for this. Let me change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added an aria-role for this for now. Good point on the tab order stuff - I'm not 100% sure that would be desired here so I'm just advertising to screen readers for now. Would have to do a bit more testing on this to see if it makes more sense to actually have the focus move to the sort indicator itself.

Comment on lines +158 to +163
<tr
key={row.id}
onClick={() => {
navigate(`${row.original.id}`);
}}
>
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, although it should likely be a full-height/full-width anchor or button nested inside the tr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one I have a rationale for - it's that I at least place an anchor tag on the name so that becomes the main "accessible" way to navigate. The click on the TR is just meant to solve the "I just want to click on the full row" but maintains the DOM structure needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha, sounds good

@mikeldking mikeldking merged commit 96bb771 into prompts Dec 16, 2024
49 checks passed
@mikeldking mikeldking deleted the mikeldking/promts-ui branch December 16, 2024 18:25
mikeldking added a commit that referenced this pull request Dec 26, 2024
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Dec 26, 2024
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Dec 27, 2024
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Dec 28, 2024
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Dec 31, 2024
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Jan 3, 2025
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Jan 3, 2025
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Jan 9, 2025
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
mikeldking added a commit that referenced this pull request Jan 9, 2025
* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants