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

moved doc root to landing page, make user landing a guide page #26332

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

story645
Copy link
Member

Makes doc/index.rst the root of the doc tree, per #26156 and discussion w/ @tacaswell. I took the approach of treating it as a sorta guide to the docs, which is why there's a little preamble before each section. It irks me that the section headers aren't all in the same case, but I'm also looking for something easily right hand parseable. #26328 was opened with this in mind to give a cleaner listing for the plot type gallery.

Moving root to doc/index.rst means that user/index.rst is no longer root. Here I got rid of it and am using user_explain/index as the landing page for the user guide. Added anatomy + shortened explanation as mentioned in #26205 as a way to orient new users to the contents of the user guide.

Changes here bring the docs more in line w/ the structure proposed in matplotlib/mpl-sphinx-theme#72

attn: @esibinga and @melissawm

@story645 story645 added Documentation: website layout/behavior/styling changes Documentation: user guide files in galleries/users_explain or doc/users labels Jul 17, 2023
doc/index.rst Show resolved Hide resolved
doc/conf.py Show resolved Hide resolved
@story645
Copy link
Member Author

story645 commented Jul 17, 2023

Reworked to be much more compact, mostly went w/ a two column structure where mostly orienting is on the left and TOC on the right, used cards for call outs and tried to keep headings for right hand side organization.

The about us section looks a bit bare and that might be nice for an easter egg image - or alternatively I could put a side by side with the top line blurb , but I don't know that we want project info up top. Underneath are contribute and release notes which are also in the upper nav bar so I'm not super concerned about it being annoying to scroll to.

For the most part tried to keep the flow in line w/ the navbar. ETA: If there's strong objection to plot types, I'll move that down to learn and use the rotator for the about double column .ETA 2: did this andI'll post as standalone commit once this one builds. Also learn can probably be changed to documentation since I think that's what most folks call that section.

@story645
Copy link
Member Author

story645 commented Jul 17, 2023

Plot types first: https://output.circle-artifacts.com/output/job/86fc3f41-39bb-4f15-91e0-2ccf58f04fa6/artifacts/0/doc/build/html/index.html

Install first: https://output.circle-artifacts.com/output/job/861ef582-afb7-45bf-8731-aeacf78fea48/artifacts/0/doc/build/html/index.html

put back shortcuts to figure/subplots/mosaic+ figure/plottting: https://output.circle-artifacts.com/output/job/865255a4-9010-4710-b26c-7b83011536aa/artifacts/0/doc/build/html/index.html

Not a huge fan of the release notes but also they'll look cleaner in the released version (and trying ifconfig devel only show devel didn't work) and spent way too much time trying to figure out how to get cards aligned nicely and giving up on that for now.

doc/index.rst Outdated Show resolved Hide resolved
@tacaswell
Copy link
Member

I agree with Jody, the content of the front page should stay about the same. I did not mean to open a discussion about radically changing what was on the front page (sorry if I communicated badly).

By making that the top of the TOC I think it would smooth out a bunch of the weirdness in how we are trying to use sphinx. Can we please keep this PR to primarily doing that rotation and separate it from any drastic content changes?

@story645
Copy link
Member Author

Can we please keep this PR to primarily doing that rotation and separate it from any drastic content changes?

I added the sections that used to be in the user guide and made some layout changes so things would flow - and I provided 3 variants with different levels of closeness to the original. The only content change was restructuring learn to remove duplication - I didn't get rid of any links.

@esibinga
Copy link
Collaborator

From a UX perspective, the small changes made to the Learn section make a big difference to usability with very little visual disruption to the existing interface. Adding a few more words and differentiating How to use Matplotlib? and What can Matplotlib do? (here) set expectations really well so that new (and experienced) users can better see/intuit where they will find explanations and guidance vs. examples and demonstrations of mpl's visual capabilities. Much more user-friendly IMO, and aligns with the structure and definitions we are working towards in the gallery tagging project.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

The reorganization makes more sense than what we had before. Glad it was relatively straight forward. I'm largely fine with the output in https://output.circle-artifacts.com/output/job/865255a4-9010-4710-b26c-7b83011536aa/artifacts/0/doc/build/html/index.html

The current version doesn't render and needs a rebase? so not 100% sure.

Other than the two major comments below, my other suggestion is that the new page is somewhat eclectic mix of cards and not cards - I can't see the reason for what is in a card and what is not in a card, so it makes it a bit confusing to my eye.

doc/users/index.rst Outdated Show resolved Hide resolved
doc/index.rst Show resolved Hide resolved
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jul 27, 2023
@jklymak jklymak added this to the v3.8.0 milestone Jul 27, 2023
@jklymak
Copy link
Member

jklymak commented Jul 27, 2023

This would ideally be finished before 3.8 doc release.

@story645
Copy link
Member Author

story645 commented Jul 28, 2023

So the existing content takes up more or less the same amount of space. I got rid of all the cards except the ones around Learn because I want to emphasize learn. Went w/ new filler text + toc instead of side by side cards cause I really wanted a navigable right hand side menu. The changes are:

  • putting install toc in other tab (b/c if you need other that's the doc you need anyway) and making this tabs and that was mostly cause I found the side by side really confusing so I figured users would too - my reasoning is that either the user knows which one they want or they should use the first one they see. Prioritizing pip here cause of [Doc]: change to install from conda forge  #24421
  • rearranging learn for the reasons @esibinga mentioned
  • third party package->ecosystem: pulled external resources here to make it more explicit that MPL does not own these documents, and that's why they're conceptually similar to the externel packages, and added some language for third party packages honestly mostly to balance space
  • pulled project info toc in from users, added the plot cycler for visual balance
  • contribute: tweaked language, will tweak back after I finish this list. replaced links with/ contribute TOC since it's all there now
  • release - pulled in from users, my personal bias would be to only link out to the release notes for the current version but that was a mess to implement w/o making major changes to the release notes machinery.

image

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

I like the new front page very much. And it's a relieve that the awkward document structure gets sorted out. 🚀

doc/index.rst Show resolved Hide resolved
doc/index.rst Outdated

.. raw:: html

<div class="grid__intro" id="image_rotator"></div>
Copy link
Member

Choose a reason for hiding this comment

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

This feels out of place. What does this have to do with "About"?

If you want to have something visual, I suggest to either use the matplotlib logo, or if that's too colorful here, some sort of "about icon".

Copy link
Member Author

@story645 story645 Jul 30, 2023

Choose a reason for hiding this comment

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

was thinking more plots are what the library is about, but could also put the old 4 panel for that
image
or maybe one of the EEG images as a nod to John Hunter
This is from the the IEEE and the open architecture paper:
image

Copy link
Member Author

Choose a reason for hiding this comment

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

so eeg pic is in old docs https://matplotlib.org/3.3.4/tutorials/introductory/sample_plots.html
the advantage of using the 4 panel is it's a call back to the readme.

Copy link
Member

Choose a reason for hiding this comment

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

was thinking more plots are what the library is about,

Yes, but plots is not what this section is about. This section is a kind of meta-section about the library itself. There are dedicatedly all non-plotting aspects, which is why I find plots inappropriate here.

More generally/aesthetically: it's a bit imbalanced that this is the only non-text entry.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, so that's why I'm now leaning towards plots that have to do with project history (like the eeg one) or nod to the website history (the 4 panel).

Another option is maybe bringing this section all the way to the top and using the intro library text as anchoring...which honestly is why I'm not so keen on writing new anchoring text.

Copy link
Member Author

Choose a reason for hiding this comment

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

:/ I hear, like maybe put that picture in the history docs. I think what could be fun is putting a rotator that pulls from the gallery images?

Copy link
Member

Choose a reason for hiding this comment

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

The advantage of the plot type images is they are all the same size and the same style. I think pulling random Gallery images would be hard, though if you had a curated list that may work.

The plot type rotator is on the front page, but I think would be useful here as well ( drives traffic to Plot Types and shows basic functionality). I would still have it near the top.

Copy link
Member Author

Choose a reason for hiding this comment

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

So yes to plot type gallery rotator next to about us, no to plot type gallery next to plot type index? I was thinking the old 4 panel for continuity, the rotator is also continuity.

The install index is wide b/c you nixed the install TOC as the side by side, but I like this layout better way b/c I think in the other tab is clearer guidance on when folks should consult that page.

Copy link
Member

@timhoffm timhoffm Jul 31, 2023

Choose a reason for hiding this comment

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

My 2 cents:

  • Rotators are ambivalent. People usually see only one sample image. They don't realize there are variants. Even if they knew, reloading to see all variants would be cumbersome. If chances are bad, they get a barbs plot and ask themselves why we have such strange plots in a prominent place. It's almost always better to have a carefully selected static image. A (carefully curated) rotator is only reasonable if we want to fill visual space without wanting to communicate anything specific beyond "hey, look, we can do nice plots". (IMHO ok on the front page, but almost nowhere else).

  • Keeping sample images for the sake continuity is not relevant. Most users will not recognize that anyway. If there is better content - visual or non-visual (including maybe no content) - that's much preferable.

Copy link
Member Author

@story645 story645 Jul 31, 2023

Choose a reason for hiding this comment

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

Ok, so here's a short 'history and mission of matplotlib` blurb that calls back to the second line on the brochure page. We start this page w/ the first line from the brochure, so it bookends nicely and is a lead in for most of the about content.
image

@timhoffm
Copy link
Member

Since #26414 is in, you should be able to rebase on master to get rid of the flake8 errors.

@story645 story645 force-pushed the doc-root branch 3 times, most recently from eee55b8 to f57fa70 Compare July 31, 2023 04:22
doc/index.rst Outdated
Comment on lines 168 to 170
Matplotlib was created by John Hunter to visualize EEG data. John's
goal was that Matplotlib make easy things easy and
hard things possible.
Copy link
Member

@timhoffm timhoffm Jul 31, 2023

Choose a reason for hiding this comment

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

If you go into history, I suggest to span the arch to the current state

Suggested change
Matplotlib was created by John Hunter to visualize EEG data. John's
goal was that Matplotlib make easy things easy and
hard things possible.
Matplotlib was originally created by neurobiologist John Hunter to
visualize EEG data. It quickly grew into a popular gerneral-purpose
plotting library. John's goal was that Matplotlib make easy things
easy and hard things possible.

On a side note (please ignore as off-topic, but I have to mention this)

I still don't like the "easy things easy and hard things possible". The first part is to be expected from any reasonable tool. If you don't do this, you simply have bad user experience. IMHO that's not a mission statement worth mentioning. - It's in particular not great, as matplotlib has a relatively steep initial learning curve (partly due to our heritage) and I'd claim that e.g. plotly makes easy things easier than we do. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly I don't love it either which is why here I'm casting it as John's goal. I don't like it at all on the brochure site for similar reasons to yours, but since it's there lets keep continuity. Also according to the history page, the pyplot interface that we now discourage was the "make things easy"

doc/index.rst Outdated
Learn
=====

Start at the :ref:`Quick Start <quick_start>` guide!
Copy link
Member

@timhoffm timhoffm Jul 31, 2023

Choose a reason for hiding this comment

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

This link can be missed easily becuase it vanishes in a prose sentence between more prominent visual elements (heading and cards):

image

I suggest to either move this into the "How to use Matplotlib" card, or highlight it more. (But this is nitpicking)

Copy link
Member Author

Choose a reason for hiding this comment

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

No I agree - used to have it in the install card but then got rid of the install 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.

also I don't like how to and troubleshooting here, but I think I'll bury it in the user guide after we sort what the guide is doing.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

give or take my suggestions.

@timhoffm timhoffm merged commit 7b5327b into matplotlib:main Jul 31, 2023
31 of 32 checks passed
@story645 story645 deleted the doc-root branch August 8, 2023 21:15
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Aug 10, 2023
The use of the rotator was dropped in matplotlib#26332. Currently, it causes an
exception on every page, because there is no 'image_rotator' element,
but this is only visible in the console or, if you have the inspector
open, it'll start the debugger.
@QuLogic QuLogic mentioned this pull request Aug 10, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: user guide files in galleries/users_explain or doc/users Documentation: website layout/behavior/styling changes Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc]: navigating to the User Guide
5 participants