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

feature: click row to view record #2825

Merged
merged 9 commits into from
Jun 27, 2024
Merged

feature: click row to view record #2825

merged 9 commits into from
Jun 27, 2024

Conversation

adrianthedev
Copy link
Collaborator

@adrianthedev adrianthedev commented May 31, 2024

Description

Adds the ability to enable clickable rows on Avo's tables.

TO-DO

  • write tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

CleanShot.2024-05-31.at.18.04.19.mp4

Manual review steps

  1. Enable click_row_to_view_record in the initializer
  2. got on a table and click a row
  3. you should be redirected to that record

Manual reviewer: please leave a comment with output from the test if that's the case.

Copy link

codeclimate bot commented May 31, 2024

Code Climate has analyzed commit 3a090c2 and detected 0 issues on this pull request.

View more on Code Climate.

export default class extends Controller {
visitRecord(event) {
if (event.type === 'click') {
const isLinkOrButton = event.target.closest('a, button, svg')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to see how the support is for svgs that need to be clicked (status field x icon).

@Paul-Bob Paul-Bob mentioned this pull request Jun 19, 2024
17 tasks
@Paul-Bob Paul-Bob merged commit 5543777 into main Jun 27, 2024
27 checks passed
@Paul-Bob Paul-Bob deleted the feature/make-row-clickable branch June 27, 2024 09:33
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants