Skip to content

Conversation

@albert-github
Copy link
Contributor

@albert-github albert-github commented Sep 29, 2022

Enhancement / suggestion

Since version `1.9.3 doxygen supports the HTML tag <details> so that parts of the documentation can be easily collapsed. This will make parts of the documentation a bit clearer and cleaner.

The following will give a small overview of the old and the new situation for the Weights package, but it applies to all packages.

old

image

new

image

Note
In general a critical (re)view should be done regarding the white space above examples is (especially) now at some places a bit a bit large, but this would be a separate PR / task.

Enhancement / suggestion

Since version `1.9.3 doxygen supports the HTML tag `<details>` so that parts of the documentation can be easily collapsed.
This will make parts of the documentation  a bit clearer and cleaner.
Copy link
Member

@lrineau lrineau left a comment

Choose a reason for hiding this comment

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

That seems nice.

@albert-github
Copy link
Contributor Author

Should I adjust all the files where cgalExample is used in respect to the note in the PR description regarding:

In general a critical (re)view should be done regarding the white space above examples is (especially) now at some places a bit a bit large, but this would be a separate PR / task.

or wait with it till this PR #6914 is integrated?

@MaelRL MaelRL added this to the 5.6-beta milestone Sep 30, 2022
The `<br>` is not necessary anymore.
@albert-github
Copy link
Contributor Author

As far as I can see with removing the <br> from the cgalExamples and using the <details> tag the layout is OK.

@lrineau

This comment was marked as off-topic.

@MaelRL
Copy link
Member

MaelRL commented Nov 9, 2022

As far as I can see with removing the <br> from the cgalExamples and using the <details> tag the layout is OK.

Is your previous remark ("In general a critical (re)view should be done regarding the white space above examples is (especially) now at some places a bit a bit large, but this would be a separate PR / task.") still applicable after this change or did you mean only for this specific example?

@albert-github
Copy link
Contributor Author

When remembering correctly the examples I inspected were now all OK.

@MaelRL MaelRL added Ready to be tested Not yet approved The feature or pull-request has not yet been approved. and removed Work in progress labels Nov 10, 2022
@afabri
Copy link
Member

afabri commented Nov 23, 2022

I am not sure that this makes sense for the examples. They are not in the middle of explanations, and usually they come with little text. At least the default should be that they are open, as otherwise I have to open them one after the other.

@albert-github
Copy link
Contributor Author

@afabri

  • This could be easily accomplished by add replacing the <details> by <details open> in the alias.
  • I think the flow of the chapter as shown in the example with the description (Using the tag <details> for cgalExamples #6914 (comment)) shows an example that is in the midst of the complete chapter.

@MaelRL
Copy link
Member

MaelRL commented Jan 20, 2023

I am not sure that this makes sense for the examples. They are not in the middle of explanations, and usually they come with little text. At least the default should be that they are open, as otherwise I have to open them one after the other.

Having everything hidden would also make it harder to search (ctrl F) for a specific text, or for other uses of a particular code.

I wonder if the "pollution" of open examples could not be reduced by changing the way it is presented: make it a block that is not as wide as the rest of the page, and change its color. Both changes make it easier to skip it and get to the next "normal" text.

Quick example below:

image

image

It could be even narrower since examples are code and we are pretty much never going above 100 characters.

@albert-github
Copy link
Contributor Author

It could be even narrower since examples are code and we are pretty much never going above 100 characters.

Is a dangerous assumption (one never knows...). Furthermore the user can make the entire window smaller in which case a overflow might occur much earlier or the user can move the vertical split bar to the right, making the text area smaller

  • Did you try in your example what would happen in these cases?

@MaelRL
Copy link
Member

MaelRL commented Jan 21, 2023

I don't see it as a dangerous assumption: examples are not external code that we have no control over. If some example has a line with 500 characters, it's easy enough to change it.

If the window gets thinner, everything becomes unreadable anyway. Actually, code blocks probably should have an horizontal scrollbar rather than use text wrapping.

@MaelRL MaelRL modified the milestones: 5.6-beta, 5.7-beta Mar 31, 2023
"cpp11=C++11" \
"CC=C++" \
"cgalExample{1}=<br><b>File</b> \ref \1 \include \1" \
"cgalExample{1}=<details><summary><b>File</b> \ref \1</summary> \include \1 </details>" \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"cgalExample{1}=<details><summary><b>File</b> \ref \1</summary> \include \1 </details>" \
"cgalExample{1}=<details open=\"true\"><summary><b>File</b> \ref \1</summary> \include \1 </details>" \

Copy link
Member

Choose a reason for hiding this comment

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

When trying locally with doxygen 1.9.6 I got a warning about the fact that \ref\ cannot be used in summary.

@sloriot sloriot modified the milestones: 6.0-beta, 6.1-beta May 21, 2024
@MaelRL MaelRL removed this from the 6.1-beta milestone Mar 17, 2025
@MaelRL MaelRL added this to the 6.2-beta milestone Mar 17, 2025
@sloriot sloriot changed the base branch from master to main September 16, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Doc Enhancement Not yet approved The feature or pull-request has not yet been approved. Ready to be tested Under discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants