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

[pull] main from solidusio:main #369

Merged
merged 7 commits into from
Oct 13, 2023
Merged

[pull] main from solidusio:main #369

merged 7 commits into from
Oct 13, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 12, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

elia and others added 6 commits October 12, 2023 12:19
Instead of rescuing NameError we proactively check if the requested
component is available. This is made possible by Zeitwerk using
`autoload` under the hood and having all loadable constants respond
`true` when asked if they are `const_defined?`.
Don't capture `NameError` if its not a missing component
Previously, the ui/table component would not register clicks on the
whole line due to nested anchor elements within the table data cells.
This commit fixes the click behavior to ensure the entire row is clickable.
This commit introduces the capability of navigational rows within
the `ui/table` component through the addition of a `row_url` proc.
The `fade_row_proc` parameter is renamed to `row_fade` to maintain a consistent
naming style throughout the component.

The `row_url` proc accepts a row object as a parameter and returns a URL string.
This URL is utilized to redirect the user when a particular row is clicked.
However, this navigation is deliberately disabled in "batch" mode to maintain the
row selection in that mode.

Example of usage:
```ruby
  row_url: ->(order) { spree.edit_admin_order_path(order) }
```
[Admin] Enhance `ui/table` component with clickable rows and URL navigation
@pull pull bot merged commit ee3277d into nebulab:main Oct 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants