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

[EuiBasicTable] Default action items should allow for dynamic names & descriptions #1401

Closed
legrego opened this issue Jan 2, 2019 · 11 comments

Comments

@legrego
Copy link
Member

legrego commented Jan 2, 2019

It appears that the DefaultItemAction can only accept hard-coded name/description values. While this isn't necessarily a bad thing, it is limiting because these actions cannot take advantage of any record-level information.

For example, I was trying to add additional screen-reader context to some action buttons (elastic/kibana#27911), but the only way to do that is to create custom item actions, with a render function. This wasn't a ton of work, but I'm wondering if this is going to become a more common problem across Kibana, where action icons will need additional context in order to be useful to people using screen readers. If so, then the usefulness of the DefaultItemAction will be reduced, because it can't provide that context currently.

Proposal

Similar to the available and render functions of custom action columns, I propose that the name and description fields of the DefaultItemActions be updated to accept either a string or a function of the form (record) => string.

@chandlerprall
Copy link
Contributor

We're going to take another look at tables & their data as the TypeScript refactor wraps up (or at least becomes more stable). That said, I would advocate for adding the (record) => string pattern in the interim if using custom actions becomes too annoying.

@shakti97
Copy link

Can I take this up?

@Gaurav-Punjabi
Copy link

Is anyone still working on this issue ? I'd like to work on it.

@chandlerprall
Copy link
Contributor

Sorry, we've been trying to keep up with these ownership requests and have been figuring out how we want to work with them. @shakti97 are you still interested in taking this? If not, I'll pass it on to @Gaurav-Punjabi

@hetanthakkar
Copy link
Contributor

hetanthakkar commented Mar 15, 2020

Is anyone (shakti97 /Gaurav-Punjabi )still working on this issue ? I'd like to work on it.

@cchaos
Copy link
Contributor

cchaos commented Mar 16, 2020

I am also finding out that we need this for the data-test-subj prop as well so they can be unique per button

@chandlerprall
Copy link
Contributor

chandlerprall commented Sep 18, 2020

#3739 widened an action's name to support the (item: T) => ReactNode pattern. We should still do the same for description, href, target, and data-test-subj.

@cchaos cchaos changed the title EuiBasicTable default action items should allow for dynamic names & descriptions [EuiBasicTable] Default action items should allow for dynamic names & descriptions Sep 19, 2020
@cchaos cchaos removed the tables label Sep 19, 2020
@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@snide
Copy link
Contributor

snide commented Mar 19, 2021

This is still valid.

@github-actions
Copy link

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

@github-actions
Copy link

❌ Per our previous message, this issue is auto-closing after having been open and inactive for a year. If you strongly feel this is still a high-priority issue, or are interested in contributing, please leave a comment or open a new issue linking to this one for context.

@cee-chen cee-chen closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants