Coder Social home page Coder Social logo

Comments (4)

dalogsdon avatar dalogsdon commented on June 2, 2024

We would duplicate it once when we clone hidden cells to show in the hidden area. I am not sure where a third one comes from.

from dashboards.

jhpedemonte avatar jhpedemonte commented on June 2, 2024

This is caused by how we show the cells in the hidden section of the dashboard. Our main goal is to show a visual representation of the cells (if they have any output). We first tried to move them from their area in the notebook to the hidden section (and allow moving back), but this breaks Notebook functionality.

In the end, we just duplicated the DOM (but not events and data). That's why there's more than 1 cell with an ID. Not sure how else we would handle this and still show a cell's visual output in the hidden area.

from dashboards.

jhpedemonte avatar jhpedemonte commented on June 2, 2024

It seems like we would want to go away from copying the DOM, since it can have bad implications. Some options we thought of as replacements:

  1. Only show code in the hidden section. Default to showing the first 5 or 10 lines, but allow user to expand. If user wants to see what that cell outputs, they can either add the cell to the dashboard or click on the edit button to go back to the Notebook view.
  2. Use html2canvas, which attempts to recreate an element's DOM and render it visually. This would allow us to show "screenshots" in the hidden section. Main downside is that this does a recreation of the DOM; it doesn't image the actual cell's DOM. That means there could be inconsistencies with rendering.

Any other suggestions?

from dashboards.

jhpedemonte avatar jhpedemonte commented on June 2, 2024

Another option:
3. Create another Gridstack which would absolutely position the hidden elements. The main issue here is that both Gridstack instances would use the same container (since we can't move any of the Notebook cells). That means they would overlap -- we'd have to add JavaScript to continually reset the height offset of the hidden Gridstack.

from dashboards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.