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

Quick data preview on cell hover #2002

Closed
3 tasks done
404-html opened this issue Jan 15, 2022 · 6 comments · Fixed by #2584
Closed
3 tasks done

Quick data preview on cell hover #2002

404-html opened this issue Jan 15, 2022 · 6 comments · Fixed by #2584
Labels
type:feature New feature or improvement of existing feature

Comments

@404-html
Copy link
Member

New Feature / Enhancement Checklist

Current Limitation

Additional actions have to be taken in order to preview data stored in the browser cell. Let's say that cell holds an object - to see it first we have to double click to enter edit mode, then extend the size of input field as it's usually too small. It's problematic when it comes to previewing many cells. Another problem here is that previewing requires jumping into editing mode which can result in accidental data change with no option to undo.
Another case is cell that holds URL to an image. To preview it have to be copied and opened in new browser tab. It would be good to preview data without leaving the dashboard.

Feature / Enhancement Description

I already posted a proposition here: #1983
The idea is to show popover with data preview on cell hover.

preview-on-hover

Example Use Case

  1. Move pointer on top of cell holding an image blob or object;
  2. Wait 300ms;
  3. Popup appears with full content of this cell inside;
  4. Move pointer to close the popup.

Alternatives / Workarounds

Extending column size to show entire cells content.
Edit mode.
Copying value and pasting it elsewhere.

3rd Party References

image

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@404-html 404-html added the type:feature New feature or improvement of existing feature label Jan 15, 2022
@mtrezza
Copy link
Member

mtrezza commented Jan 15, 2022

Some thoughts (as previously mentioned in the PR):

  • executing a URL request on hover may not be desired and could even pose security issues, e.g. an app user stores a malicious URL in their user profile; a dashboard users hovers over it an executes a call to that URL
  • a dashboard user may not want to download a large image file
  • it can be rather annoying and impeding the workflow if previews pop up unwanted just by hovering over it
  • requesting a URL that is stored in a field of type "String" seems rather arbitrary;
    • should a URL that is part of a longer text be extracted and requested?
    • should whitespaces be trimmed?
    • should a URL without protocol (e.g. example.com/img.png) be requested with or without TLS?

In any case, I see a feature that requests a URL on hover at disabled by default, which can be enabled on a per-class / per field basis, for security.

Other ideas:

  • a) Parse the contents of a String field for URLs patterns, highlight them and convert them to links that open a new tab as preview (or a preview pop-up, or a split view). That would require a click instead of hover, which would be a more conscious action with less security implications, so that could be always enabled.
  • b) Allow to right-click on the cell, and add all detected URLs in the context menu to open in a new tab.
  • c) Display images in the cell, scaled to a max width / height so that no hover is necessary. That could be practical in something like a list of products I would imagine.

@FransGH
Copy link
Contributor

FransGH commented May 26, 2023

What about a plug-in architecture to render and/or preview cells?

Theoretically it would be possible to dynamically load components that could render a cell and/or provide a popup for viewing/editing. A good example would be the ACL dialog. The existing render function (currently one big if/else of types) might just iterate trough a list of custom and standard components. Plug-ins would need to be configured and hosted at the server, similar to Parse Server.

I'm currently deploying a forked version of the dashboard with some custom cell rendering. Will try to setup a POC with a simple plug-in.

Anyone tried this before or has ideas?

@mtrezza
Copy link
Member

mtrezza commented May 26, 2023

Sounds interesting! Maybe you want to put forth a concept to discuss in more detail?

@FransGH
Copy link
Contributor

FransGH commented May 27, 2023

Happy to share when I get something working. For now unfortunately little time to play around but hope to get some time soon as I have a similar requirement for an upcoming project (dynamic loading of react sub-components).

@mtrezza
Copy link
Member

mtrezza commented Aug 15, 2024

Closing this in favor of #2495, which provides the same functionality in a different way. It addresses all the issues in #2002 (comment) because remote content loading is controlled by a Cloud Function that allows for verification, customization, etc.

@mtrezza mtrezza closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
3 participants