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

Un-hidden columns contain empty fields #1716

Closed
3 tasks done
mtrezza opened this issue May 27, 2021 · 14 comments · Fixed by #1734
Closed
3 tasks done

Un-hidden columns contain empty fields #1716

mtrezza opened this issue May 27, 2021 · 14 comments · Fixed by #1734
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@mtrezza
Copy link
Member

mtrezza commented May 27, 2021

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • You're running version >=1.0.23 of Parse Dashboard.
  • You're running version >=2.3.2 of Parse Server.
  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Issue

The PR #1694 excluded hidden columns from being fetched from the server. When showing previously hidden columns, the values for the un-hidden fields are (undefined), because their values have not been fetched. Clicking the "Reset" button loads the fields.

Instructions

  1. Hide a column with values
  2. Click "Reload"
  3. Un-hide column --> fields are empty
  4. Click "Reload" --> fields contain values
@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label May 27, 2021
@sadakchap
Copy link
Member

Thanks @mtrezza for detailed instruction to reproduce the issue. But, I still could not reproduce the issue. could you please check below gif & tell me which step I am missing ?

Steps I followed -

  1. Hide a column with values
  2. Hit refresh button
  3. Un-hide that column --> still can see the values

unhideCols

@mtrezza
Copy link
Member Author

mtrezza commented May 28, 2021

You did it correctly. Could you try to create a new column and repeat it with that? Maybe it only happens for certain columns.

@sadakchap
Copy link
Member

Still was not able to reproduce the issue.

@mtrezza
Copy link
Member Author

mtrezza commented May 29, 2021

This is what I see on Safari. Note that without refreshing, the column contains data after un-hiding it. But after refreshing, it does not contain data when un-hiding it. I am using branch 2a4479a.

I think the simple question is, if columns a not fetched when they are hidden, how would the data show in the column after un-hiding it? Or does un-hiding a column trigger a query?

Screen.Recording.2021-05-29.at.16.34.39.mov

@fn-faisal
Copy link
Member

I tried to reproduce this on Chrome, Safari browsers but could not reproduce this. I tried the master branch and the commit but can't reproduce this.
It would be helpful if we had some more information regarding this like the devtools console, network request response for the refresh call.
Thank you.

@davimacedo
Copy link
Member

What do you guys think about automatically refreshing the data everytime a new column is marked as visible?

@mtrezza
Copy link
Member Author

mtrezza commented Jun 10, 2021

Yes, that was my previous question:

I think the simple question is (...) does un-hiding a column trigger a query?

I tested with current masters of parse server (parse-community/parse-server@0638e5e) and parse dashboard (b044768) with Safari and Chrome (both not in private mode). Server and dashboard run locally and the dashboard runs with npm run dev. In the browser console a column hiding or unhiding does not seem to trigger a server request.

If that is the case, then the video in #1716 (comment) does not make sense, because where would the data come from. @sadakchap can you confirm that there is no server request when the column is unhidden?

@sadakchap
Copy link
Member

sadakchap commented Jun 11, 2021

Yes, no server request is going when the column is unhidden.
unhide

Please see the above gif.

  1. Hit refresh button, 1 server request is made. (no column is hidden)
  2. Hide column ( username is hidden )
  3. Hit refresh, 1 server request is again made.( please notice that this request still gives value of hidden column )
  4. Unhide the column, column still has values

@sadakchap
Copy link
Member

sadakchap commented Jun 11, 2021

@mtrezza, I tried to add a breakpoint before exclude query. Please see the below gif.

unhideExplained

  1. added a breakpoint, cleared the localstorage(as this is where we store column preference)
  2. Hit refresh for the first time ( no column is hidden till now )
  3. Hide a column, here we got key on localstorage which has hidden column visible set to false.
  4. Hit refresh, see at breakpoint columns is still null.

From above gif, I think maybe some problem in getting column preference from localstorage as it is always null and query.exclude never got executed resulting in a request which is fetching all details.

Could you please try to reproduce this issue after clearing localstorage.

@sadakchap
Copy link
Member

I think it is clear from above video, that we are unable to get columns from local storage. Here's the pr #1734 for that.

@mtrezza
Copy link
Member Author

mtrezza commented Jun 15, 2021

Yes, no server request is going when the column is unhidden.

Well, I think that is the simple explanation, isn't it? Where would the column data come from if a previous query excluded the field.

Hit refresh, 1 server request is again made.( please notice that this request still gives value of hidden column )

The request should exclude the field, so that should not happen. That was the point of #1694. If you cannot reproduce the issue, you may not be using the current master branch where the PR has been merged.

@sadakchap
Copy link
Member

sadakchap commented Jun 29, 2021

Well, I think that is the simple explanation, isn't it? Where would the column data come from if a previous query excluded the field.

Yes but, the previous request actually never excluded the field. Please refer the video above once more. You can see the Network tab.

The request should exclude the field, so that should not happen. That was the point of #1694. If you cannot reproduce the issue, you may not be using the current master branch where the PR has been merged.

I think I am using latest master branch. I also had put a debugger, you can see the code, it's from master branch.
Honestly I never reviewed this #1694, I don't know why field is not getting excluded in request.

@davimacedo
Copy link
Member

@mtrezza can we close this one?

@mtrezza
Copy link
Member Author

mtrezza commented Aug 25, 2021

Yes, closed with #1734

@mtrezza mtrezza closed this as completed Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants