Skip to content

ROWY-816 Fix: Small blip in the ordering columns#1023

Merged
shamsmosowi merged 13 commits intorowyio:developfrom
iamanishroy:develop
Dec 31, 2022
Merged

ROWY-816 Fix: Small blip in the ordering columns#1023
shamsmosowi merged 13 commits intorowyio:developfrom
iamanishroy:develop

Conversation

@iamanishroy
Copy link
Member

@iamanishroy iamanishroy commented Dec 17, 2022

Issue

  1. Try to reorder columns via drag and drop
  2. There is a small blip in the ordering as showing in the video below

issue-gif

Fix

  • After close inspection, I found the cause of this issue lies with updating the state, as it's taking a noticeable time to update. Thus, resulting in this flicker effect.
  • A possible fix I came up with is performing an optimistic update before truly updating the state.

And the final result.

fixed-gif

@vercel
Copy link

vercel bot commented Dec 17, 2022

@iamanishroy is attempting to deploy a commit to the Rowy Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Dec 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
rowy-os ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Dec 31, 2022 at 9:02AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
rowy-typedoc ⬜️ Ignored (Inspect) Dec 31, 2022 at 9:02AM (UTC)

@iamanishroy iamanishroy changed the title Develop Fix: Small blip in the ordering columns Dec 17, 2022
@iamanishroy iamanishroy changed the base branch from main to develop December 17, 2022 09:14
@harinij harinij changed the title Fix: Small blip in the ordering columns ROWY-816 Fix: Small blip in the ordering columns Dec 26, 2022
@harinij harinij requested a review from shamsmosowi December 26, 2022 09:32

// This is where we update the documents
const handleSubmit = () => {
const handleSubmit = async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This part looks good. However, it should have been a separate PR. it's okay for now, but for the future, since its a separate issue

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay


const updateColumn = useSetAtom(updateColumnAtom, tableScope);

// function to revalidate quickAccessTableColumnsOrdered
Copy link
Contributor

Choose a reason for hiding this comment

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

Screen.Recording.2022-12-27.at.1.05.31.pm.mov

While this solution works for reordering items on the hidden columns UI, it doesn't solve the same issue occurring on the table DnD interaction, it also adds unnecessary computation of reordering that's already being handled by the updateColumn atom, I think an ideal solution would be to implement optimistic updates in the useFirestoreDocWithAtom and solve all similar issues

Copy link
Member Author

Choose a reason for hiding this comment

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

As suggested, I worked on it.

@shamsmosowi shamsmosowi merged commit c914097 into rowyio:develop Dec 31, 2022
@iamanishroy iamanishroy deleted the develop branch January 2, 2023 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants