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

List function aliases in a more compact layout #3666

Merged
merged 5 commits into from
Dec 4, 2024
Merged

Conversation

seisman
Copy link
Member

@seisman seisman commented Dec 2, 2024

As shown in the screenshot below (the left one), currently, the function aliases are listed vertically, wasting a lot of vertical spaces. This PR uses the hlist directive to make the list more compact, by listing 4 items per row (the right one).

The main branch This PR
image image

Preview: https://pygmt-dev--3666.org.readthedocs.build/en/3666/api/generated/pygmt.Figure.basemap.html

@seisman seisman added needs review This PR has higher priority and needs review. documentation Improvements or additions to documentation labels Dec 2, 2024
@seisman seisman added this to the 0.14.0 milestone Dec 2, 2024
@seisman seisman marked this pull request as ready for review December 2, 2024 13:49
@seisman seisman changed the title Use a more compact layout for the list of aliases More compact layout for the list of aliases Dec 2, 2024
@seisman seisman changed the title More compact layout for the list of aliases List function aliases in a more compact layout Dec 2, 2024
@weiji14
Copy link
Member

weiji14 commented Dec 2, 2024

Could you try 3 columns instead of 4? The columns seem to go too close to the edge of the browser window on a less wide window (e.g. when I have two windows side by side).

image

pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
@weiji14
Copy link
Member

weiji14 commented Dec 3, 2024

Readthedocs build failing because of #3301 (comment) 😅 Docs build isn't broken yet, probably due to caching, but it'll probably break on newer PRs.

@michaelgrund
Copy link
Member

With 3 columns it looks good to me. Makes the whole thing also better readable in my opinion since you dont have to scroll down for long lists.

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Yep, looks better now on half a screen!

image

@seisman seisman merged commit aba9a9c into main Dec 4, 2024
21 checks passed
@seisman seisman deleted the doc/alias-style branch December 4, 2024 01:51
@seisman seisman removed the needs review This PR has higher priority and needs review. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants