Skip to content

Design interactive docs styling for rendered notebook cells #142

@isabela-pf

Description

@isabela-pf

Context

As a part of this project #19, @gabalafou made changes to PyWavelets’ theme. This included implementing visual styling for notebook code cells. This is not the only project that will need or currently has notebook code cells; we need to provide a baseline styling that can be used across documentation contexts.

To be clear, this feature (rendered notebook cells) already exists across the ecosystem. The goal is to create something standard so that each project does not need to handle it fresh each time.

Proposal

I've been brought in to propose a styling that will work for multiple use cases with the goal of setting a notebook cell styling standard upstream. The changes discussed here will be proposed first to the PyData Sphinx theme by @gabalafou and I. The styling proposed needs to

  • Focus on cells that don't make sense rendered as default markup, namely code cells that need their input and outputs shown
  • Ensure this does not clash with the rendering of other notebook contents
  • Create a baseline design with flexibility to work for a wide range of notebook code cell output types and for potential needs of different projects
  • Demonstrate changes as they will appear first in the default PyData Sphinx theme

Updates and actions

  • Gather and compare how other notebook code cell styling already existing in the ecosystem.
  • Clarify what information we have available from the notebook code cell and potential constraints from MyST-NB and nbsphinx.
  • Propose a few styling directions to the PyData Sphinx theme (with pros and cons listed for ease).
  • Get review here, on the PyData Sphinx theme repo, and the Scientific Python Discourse at minimum.
  • Develop changes into the PyData Sphinx Theme

As always, this this issue will be updated if this changes. Feedback is welcome and needed. Thank you in advance! 🌻

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions