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

8484 - Add visual indicator for drag and drop on rows #8621

Closed
wants to merge 17 commits into from

Conversation

ericangeles
Copy link
Contributor

@ericangeles ericangeles commented Apr 17, 2024

Explain the details for making this change. What existing problem does the pull request solve?

This PR adds visual indicator (border bottom color) for drag and drop on grouped rows in datagrid.

Related github/jira issue (required):

Closes #8484

Steps necessary to review your pull request (required):

  • Pull this branch, build, and run the app

1.) Group row reorder

2.) Row reorder (Non Group)

Included in this Pull Request:
- [ ] An e2e or functional test for the bug or feature.

  • A note to the change log.

@ericangeles ericangeles requested a review from a team as a code owner April 17, 2024 11:08
Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Indicator is not on the correct rows or not showing once page scroll is triggered. When scrolled at the very bottom of the page, indicator is not showing anymore.

Animation

@ericangeles ericangeles added the ready for qa Ready for QA to review label Apr 18, 2024
Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Some issues found

  1. An error occurs when dragging a row in the header row.
    Animation

  2. No visual indicator when selected reset to default option - is this also supported @ericangeles?
    Animation

  3. No indicator as well found in http://localhost:4000/components/datagrid/example-row-reorder.html - maybe same case as item 2
    Animation

@ericangeles
Copy link
Contributor Author

@n-ace-ancog, I am not getting any errors. This PR is only for the group row, so you cannot see the feature in that example.

@ericangeles
Copy link
Contributor Author

I think if you hold too much in the row it shows the error?

@ericangeles
Copy link
Contributor Author

@n-ace-ancog, test it again. There should be no errors in the console.

Copy link
Contributor

@jbrcna jbrcna left a comment

Choose a reason for hiding this comment

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

working as expected
Large GIF (1300x712)
However, when reset to default is used, the indicator is not shown.
image

@ericangeles
Copy link
Contributor Author

This is for Grouped Row only feature @infor-design/qa.

n-ace-ancog
n-ace-ancog previously approved these changes Apr 18, 2024
Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Working as expected now.
Animation

Baseline bug

  • After swapping any two rows, dragging the row while not using the draggable indicator causes errors in the console. Replicated in main.
    Animation

@ericangeles
Copy link
Contributor Author

@n-ace-ancog, let me fix that in here. One sec.

n-ace-ancog
n-ace-ancog previously approved these changes Apr 18, 2024
Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

All working as expected now.
Animation

janahintal
janahintal previously approved these changes Apr 18, 2024
Copy link
Contributor

@janahintal janahintal left a comment

Choose a reason for hiding this comment

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

@tmcconechy
Copy link
Member

@ericangeles asking design to review. One note: If approved this should go on all row-reorder examples not just the group one i.e. https://8484-datagrid-drag-icon-enterprise.demo.design.infor.com/components/datagrid/example-row-reorder.html

@ericangeles
Copy link
Contributor Author

ericangeles commented Apr 18, 2024

@tmcconechy, sure thing. I was also looking into that, but the JIRA ticket does not provide detailed information, and the story points is only set at 2.

@tmcconechy
Copy link
Member

@ericangeles agreed maybe make it a 3? doesnt really matter thats what they communicated to me in a call.

Copy link
Contributor

@glenlieorillo glenlieorillo left a comment

Choose a reason for hiding this comment

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

Visual Indicator is not properly aligned in RTL.

image

Screen.Recording.2024-04-19.at.9.59.38.AM.mov

Expander hover and focus state are misaligned in RTL. Filed an issue for this bug: 8629

Screen.Recording.2024-04-19.at.11.11.52.AM.mov

Copy link
Contributor

@jbrcna jbrcna left a comment

Choose a reason for hiding this comment

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

confirming on my end as well
visual indicator is not aligned on the left border. RTL
image

@ericangeles ericangeles dismissed stale reviews from janahintal and n-ace-ancog via 916e36e April 23, 2024 08:49
@ericangeles
Copy link
Contributor Author

@infor-design/qa ready for testing in non group row reorder. I updated the steps to test it.

Copy link
Contributor

@jbrcna jbrcna left a comment

Choose a reason for hiding this comment

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

Failing in Safari
image

Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Some observations:

  1. The visual indicator works on very slow movement, but when dragging items faster - its unnoticeable. As per the gif below, the 1st part I am dragging the rows considerably slow to trigger the indicator compared to the 2nd part where I drag it to what I consider normal where the indicator rarely shows up
    Animation
  2. The visual indicator only shows up when meeting a specific condition. As I observe, it only shows when the floor of the moving row is close or overlaps on the floor of the row being replaced. This maybe related to item 1.
    Animation

@jbrcna
Copy link
Contributor

jbrcna commented Apr 26, 2024

the vi only shows when it merges with the bottom border. may I clarify if is this by design?
image
image

@tmcconechy
Copy link
Member

@ericangeles im not seeing the divider. But when i drag i see it move a few pixels (maybe it needs to be fixed position) but its also invisible

Copy link
Contributor

@glenlieorillo glenlieorillo left a comment

Choose a reason for hiding this comment

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

Same observation. No visual indicator or divider upon dragging a row.

https://8484-datagrid-drag-icon-enterprise.demo.design.infor.com/components/datagrid/example-grouping-row-reorder.html

Screen.Recording.2024-04-29.at.3.51.27.PM.mov

@jbrcna
Copy link
Contributor

jbrcna commented Apr 29, 2024

same on my end as well.
image

Copy link
Contributor

@janahintal janahintal left a comment

Choose a reason for hiding this comment

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

Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Very nice!

Found some issues

  1. It seems in the in the group reorder data grid, dragging the rows from bottom to the top doesn't trigger it always.

Group re-order - encountering issues
Animation

Row reorder - seems ok
Animation

  1. The indicator is not that visible in dark mode - more if dragging it where there's a header row below

Animation

Animation

@ericangeles
Copy link
Contributor Author

@n-ace-ancog, that's the default behavior in the grouping. We can discuss that with the design team, @tmcconechy. The way you drag it to swap it is to reposition the entire section of the row. Again, this one isn't specced out. Could you classify it as a bug? We can fix it if we have more time for the next sprint.

glenlieorillo
glenlieorillo previously approved these changes May 2, 2024
Copy link
Contributor

@glenlieorillo glenlieorillo left a comment

Choose a reason for hiding this comment

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

This is now working as expected. However, the visual indicator is not visible in Dark Mode as mentioned by @n-ace-ancog.

Screen.Recording.2024-05-02.at.6.38.09.PM.mov
Screen.Recording.2024-05-02.at.6.39.56.PM.mov
Screen.Recording.2024-05-02.at.6.41.24.PM.mov
Screen.Recording.2024-05-02.at.6.43.50.PM.mov

@ericangeles
Copy link
Contributor Author

@n-ace-ancog @glenlieorillo, I pushed a fix for dark theme.

Copy link
Contributor

@jbrcna jbrcna left a comment

Choose a reason for hiding this comment

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

the visual indicator can now be seen and obvious.
image
image

However, when you move an item and place it over the row you wanted it to be transferred, it goes over the top of the supposed row
see below.. I am placing it on 2nd row and it goes over the 1st row. Notice that the indicator is in the 2nd row
Large GIF (678x412)

Also in dark mode, v.i is now shown

image

@tmcconechy
Copy link
Member

@ericangeles yeah this is an enhancement and im ok with leaving this out of this release. Its not well thought out.

On https://8484-datagrid-drag-icon-enterprise.demo.design.infor.com/components/datagrid/example-grouping-row-reorder.html it seems like:

a) any items a drag do not stay in that position (for example try to drag 6 to the top)
b) when the indicator appears it moves the rows up and down a couple pixels

Copy link

@n-ace-ancog n-ace-ancog left a comment

Choose a reason for hiding this comment

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

Visual indicator are now more visible in dark mode.

Animation

@ericangeles - i just noticed that the cursor + the indicator are telling a different actions that can be done.

For example in the baseline, the cursor is telling me when the row is ready to be dropped
Animation

But in this branch, the cursor was in ready state with the indicator, but upon releasing it did not swap rows. I had to go further for the row swapping to happen, but then the blocked cursor appears
Animation

@ericangeles
Copy link
Contributor Author

@tmcconechy, let's park this for now and present the intended design and behavior to the design team. It will be a waste of time if we don't have the correct guidelines for this feature.

@tmcconechy
Copy link
Member

@ericangeles yeah lets review this again with design. But the feedback from Amanda i got was to use that line. I just dont feel like it adds a lot. But parking it until we can review

Copy link
Contributor

@janahintal janahintal left a comment

Choose a reason for hiding this comment

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

@ericangeles
Copy link
Contributor Author

Closing this PR as I will create a new fix for this feature.

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.

Datagrid: Add visual indicator for drag and drop on rows
6 participants