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

Allow collections to render changelog as part of their docsite #267

Merged
merged 9 commits into from
Apr 6, 2024

Conversation

felixfontein
Copy link
Collaborator

@felixfontein felixfontein commented Mar 31, 2024

Fixes #31.

To do:

  • Add documentation.
  • Add proper error handling.
  • Make configuration more future-proof.
  • Discuss at DaWG meeting where to place changelog on collection index page.
  • Add tests.

@felixfontein
Copy link
Collaborator Author

@felixfontein
Copy link
Collaborator Author

This is now ready for review! (I will only mark the PR as that on GitHub once the DaWGs meeting was able to talk about this.)

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

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

mostly looks good to me! been looking forward to this for a long time, I'll be able to remove my symlinks and extra docs entries in a bunch of collections, thanks for implementing!

@@ -12,6 +12,11 @@
from antsibull_docs._pydantic_compat import v1 as p


class ChangelogConfig(p.BaseModel):
# Whether to write the changelog
write_changelog: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we think we might ever default this to true? maybe in a new major version?
I guess we'd want to discuss in the forum and/or dawgs meeting.

If so, we could announce the future default value in the changelog in this PR too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should never default to true, but it could default to something like "auto" which checks whether changelogs/changelog.yaml is present and only then sets it to true. But that would have to wait for a new major release.

Also I don't think the default should switch; I'd rather have a configurable toggle for the docsite build which allows to override this for collections.

Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

Some minor comments. @felixfontein my 2c is that changelog should come at the very end of the index page, like release notes.

changelogs/fragments/267-changelog.yml Outdated Show resolved Hide resolved
docs/collection-docs.md Outdated Show resolved Hide resolved
@samccann
Copy link
Contributor

samccann commented Apr 2, 2024

Thanks for this! I like the current location of where you put the changelog.

In the DaWGs meeting I mentioned that the left-hand nav is quite busy in the demo page. I'm not sure if this would be the same in the full docsite or not, but figured I'd mention it. @briantist mentioned it might benefit from using 'squash heirarchy'.

@briantist
Copy link
Contributor

In the DaWGs meeting I mentioned that the left-hand nav is quite busy in the demo page. I'm not sure if this would be the same in the full docsite or not, but figured I'd mention it. briantist mentioned it might benefit from using 'squash heirarchy'.

Sorry my wording may have been confusing. The preview shown here, and its "busy" left-hand navigation, is caused by using --squash-hierarchy, something we use sometimes for docs previews like this, where only a single collection is being rendered.

It won't look like that on the main docsite, or anywhere where the option is not explicitly used.

--squash-hierarchy is an existing option in antsibull-docs that isn't related to this changelog functionality.

@samccann
Copy link
Contributor

samccann commented Apr 2, 2024

ah gotcha. thanks for clarifying!

Co-authored-by: Don Naro <dnaro@redhat.com>
@felixfontein
Copy link
Collaborator Author

Now we have @oraNod who prefers the changelog at the bottom of the collection index page, and @samccann who likes the current location. @briantist what do you think? And are there other opinions on this? :)

@samccann
Copy link
Contributor

samccann commented Apr 2, 2024

I posted on the docs channel as well in case anyone else has an opinion.

@briantist
Copy link
Contributor

I don't think I'm leaning too strongly in either direction. I have maybe a slight preference for its current location, but it doesn't matter that much. Mainly I wouldn't want it stuck somewhere in the middle, so near the top like it is now (just after communication), or all the way at the bottom, are decent options.

@samccann
Copy link
Contributor

samccann commented Apr 3, 2024

Same here. Not a hill I'm wiling to die on. Go with either option.

@leogallego
Copy link

My take:

As both the changelog and the plugins list can be quite long dependending on each collection:

As long as the changelog is not too long, and ideally if it only shows the "big changes/deprecation warning", I would prefer the middle, so you get a glimpe of changes just by scrolling through the doc before reaching the plugins.

If it might be too long, then I would move it to the bottom, to avoid disrupting the plugin scrolling (which is most likely the reason you went to the docs in the first place)

@felixfontein
Copy link
Collaborator Author

This is only about a link to the changelog. The changelog itself is on a separate page. So don't worry about its length :)

@leogallego
Copy link

leogallego commented Apr 3, 2024

This is only about a link to the changelog. The changelog itself is on a separate page. So don't worry about its length :)

Oh, if it's just a link, then middle works better in my opinion.
Helps remind people (me) to click at it while scrolling :)

Edit: by the way, by middle I mean the Index position (3rd out of 5 in the example)

@felixfontein
Copy link
Collaborator Author

In that particular example, the changelog is already in the 'middle'; it comes after the collection information (description, communication) and before the extra documentation (if available) and plugin/module/role index.

@felixfontein felixfontein marked this pull request as ready for review April 6, 2024 21:11
@felixfontein
Copy link
Collaborator Author

Since most like the current location and there haven't been more opinions, I'm going to merge the current version. I'll wait some more days before creating a new release, so if compelling new opinions / insights come up we can still change it without breaking something that's released :-)

@felixfontein felixfontein merged commit a8f0773 into ansible-community:main Apr 6, 2024
12 checks passed
@felixfontein felixfontein deleted the changelog branch April 6, 2024 21:14
@felixfontein
Copy link
Collaborator Author

Thanks everyone for your reviews and opinions!

felixfontein added a commit to ansible-collections/community.dns that referenced this pull request Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render changelogs in docsite build
5 participants