Skip to content

DOC: dropdowns in userguide #24493

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

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,39 @@ table.property-table td {
display: inline-block;
margin: 0 0.5em;
}
/* Removes title from toc in dropdwon */

.sd-dropdown>.sd-card-body>.toctree-wrapper>ul>.toctree-l1>a{
display: none
}

.sd-dropdown>.sd-card-body>.toctree-wrapper>ul>.toctree-l1>ul{
list-style:none;
padding-inline-start:0em;
}

/* styles dropdown like toctree-toggle */
details.sd-dropdown{
box-shadow: none !important;
}

details.sd-dropdown summary.sd-card-header,
details.sd-dropdown summary.sd-card-header+div.sd-summary-content {
--pst-sd-dropdown-color: none;
}

details.sd-dropdown summary {
/* padding: 1em; */
padding: 0;
}

.sd-dropdown>.sd-card-body{
padding: 0;
}

details.sd-sphinx-override.sd-dropdown.sd-card.sd-mb-3{
border-top-style: solid !important;
border-top-color: var(--pst-color-border) !important;
border-top-width: .1em !important;
border-radius: 0;
}
5 changes: 3 additions & 2 deletions doc/users/explain/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

.. redirect-from:: /users/explain

Explanations
------------

API Documentation
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a confusing change as the difference between "API Reference" and "API Documentation" is very small in my reading.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there something more narrow/specific than explanations but less specific than API documentation?

=================

.. toctree::
:maxdepth: 2
Expand Down
149 changes: 122 additions & 27 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,135 @@

.. redirect-from:: /contents

==========
User guide
==========

###########
Users guide
###########
.. grid:: 1 1 3 3

General
#######
.. grid-item-card:: Information
Copy link
Member

Choose a reason for hiding this comment

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

Can you leave the card out and replace it with a regular title? I feel the double nesting of cards and dropdowns is a bit much.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me try regular grid instead of card?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, so regular grid is worse cause the responsiveness of cards is better but it might be fixable w/ styling.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok so responsiveness has nothing to do w/ cards just w/ grid but I have a hacked together thing going here

Copy link
Member Author

@story645 story645 Nov 22, 2022

Choose a reason for hiding this comment

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

ok, so added a commit w/ grids no cards but don't like that the titles are teensy:
image

circle link

:shadow: none
:class-card: sd-border-0
:class-title: sd-fs-4

.. toctree::
:maxdepth: 2
.. dropdown:: :doc:`getting_started/index`
:open:
:class-title: sd-fs-5

getting_started/index.rst
installing/index.rst
explain/index.rst
faq/index.rst
resources/index.rst
.. toctree::
:maxdepth: 2

Tutorials and examples
######################
getting_started/index.rst

.. toctree::
:maxdepth: 1
.. dropdown:: :doc:`installing/index`
:open:
:class-title: sd-fs-5

../plot_types/index.rst
../tutorials/index.rst
../gallery/index.rst
.. toctree::
:maxdepth: 2

Reference
#########
installing/index.rst

.. toctree::
:maxdepth: 2
.. dropdown:: :doc:`../devel/index`
:open:
:class-title: sd-fs-5

../api/index.rst
../devel/index.rst
project/index.rst
release_notes.rst
.. toctree::
:maxdepth: 2

../devel/index.rst

.. dropdown:: :doc:`project/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

project/index.rst


.. grid-item-card:: Explanations & Examples
:shadow: none
:class-card: sd-border-0
:class-title: sd-fs-4

.. dropdown:: :doc:`explain/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

explain/index.rst

.. dropdown:: :doc:`../plot_types/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

../plot_types/index.rst

.. dropdown:: :doc:`../tutorials/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

../tutorials/index.rst

.. dropdown:: :doc:`../gallery/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

../gallery/index.rst


.. grid-item-card:: References & Resources
:shadow: none
:class-card: sd-border-0
:class-title: sd-fs-4

.. dropdown:: :doc:`../api/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

../api/index.rst

.. dropdown:: :doc:`release_notes`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

release_notes.rst

.. dropdown:: :doc:`faq/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

faq/index.rst

.. dropdown:: :doc:`resources/index`
:open:
:class-title: sd-fs-5

.. toctree::
:maxdepth: 2

resources/index.rst

`User Contributed Packages <https://matplotlib.org/mpl-third-party/>`_
3 changes: 2 additions & 1 deletion doc/users/project/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.. redirect-from:: /users/backmatter

===================
Project information
-------------------
===================

.. toctree::
:maxdepth: 2
Expand Down