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

Add autoFocus to management toolbar #3895

Closed
4lejandrito opened this issue Jan 20, 2021 · 5 comments
Closed

Add autoFocus to management toolbar #3895

4lejandrito opened this issue Jan 20, 2021 · 5 comments
Labels
rfc Similar to the RFC that are used in React.js, Ember.js, Gatsby.js and Rust, but to mark problems tha

Comments

@4lejandrito
Copy link
Member

What is your proposal?

To add the autoFocus property to the management toolbar component so that the search box gains focus if present.

Why would adopting this proposal be beneficial?

At the moment we have this piece of code in Documents and Media to achieve that. It is not only ugly but also caused some recent issues and will likely break again in the future.

What are the alternatives to this proposal?

Keep using our ugly code 😢 .

Thanks!

@4lejandrito 4lejandrito added the rfc Similar to the RFC that are used in React.js, Ember.js, Gatsby.js and Rust, but to mark problems tha label Jan 20, 2021
@bryceosterhaus
Copy link
Member

@4lejandrito I think this is a fix that needs to be made in the DXP implementation of ManagementToolbar. If you want, you can go ahead and send a PR to the liferay-frontend repo and add that prop in. I believe you would just need to add it to this component and then make it available in the taglib in this file

@4lejandrito
Copy link
Member Author

Hi @bryceosterhaus,

We're happy to implement it just for DXP but I still think it belongs to the clay component.

Feel free to close this ticket and we will create an LPS to implement it in portal.

Thanks!

@bryceosterhaus
Copy link
Member

@4lejandrito that should already be possible with components in Clay@v3. Our management toolbar package contains a bunch of low-level components to be composed together. If you look at our storybook example of Management toolbar, you would just need to add that autoFocus prop to the ClayInput component use in management toolbar.

@4lejandrito
Copy link
Member Author

I didn't know that. Then it sounds much better.

Thanks @bryceosterhaus!

@4lejandrito
Copy link
Member Author

See https://issues.liferay.com/browse/LPS-127020.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc Similar to the RFC that are used in React.js, Ember.js, Gatsby.js and Rust, but to mark problems tha
Projects
None yet
Development

No branches or pull requests

2 participants