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

(v2.5.x) Deprecate 'headerFooter' in favour of 'standalone' #1162

Conversation

abelsromero
Copy link
Member

Kind of change

  • Bug fix
  • New non-breaking feature
  • New breaking feature
  • Documentation update
  • Build improvement

Description

What is the goal of this pull request?

Deprecate 'headerFooter' in favour of 'standalone'

  • Replace headerFooter methods in OptionsBuild & Options
  • Added 'standalone' description to docs
    Other changes included:
  • Re-ordered options in docs to follow alphabetical order
  • Remove some unnecessary throws from tests
  • Add missing '@deprecated' to templateDir method

Related to #1161

How does it achieve that?

Simply add new method and change the use of the header_footer option in the internal map by standalone.
The old option is still accepted in the map, hence the check in AsciidoctorUtils.

Are there any alternative ways to implement this?

No

Are there any implications of this pull request? Anything a user must know?

No, no breaking change introduced.

Issue

If this PR fixes an open issue, please add a line of the form:

Fixes #1160

Release notes

Please add a corresponding entry to the file CHANGELOG.adoc

@abelsromero abelsromero changed the title Deprecate 'headerFooter' in favour of 'standalone' (v2.5.x) Deprecate 'headerFooter' in favour of 'standalone' Apr 5, 2023
@abelsromero
Copy link
Member Author

Any idea why CI is not running for this branch? 🤔 It's set in the config

@robertpanzer
Copy link
Member

I have no idea as well unfortunately.
I wanted to spend some more time digging into this, but recently I barely find any time.
Do you have any idea?

@abelsromero
Copy link
Member Author

I have no idea as well unfortunately.
I wanted to spend some more time digging into this, but recently I barely find any time.
Do you have any idea?

Nop, but should be easy 🤞 I'll check in my fork later.

@@ -86,7 +86,8 @@ private static List<String> getOptions(Map<String, Object> options) {
optionsAndAttributes.add(options.get(Options.ERUBY).toString());
}

if (options.containsKey(Options.HEADER_FOOTER)) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can remove this entire method.
It seems like it's only called to produce some debug log message and in one test.
But apart from that AsciidoctorUtils.toAsciidoctorCommand() and AsciidoctorUtils.getOptions() does not seem to provide much value.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you mean toAsciidoctorCommand I think the same. Whenever I wanted to reproduce something in asciidoctor I could build the command directly, no need to check this debug. And it's a source of modularity issues.

Do you want to create an issue for that? It helps me to keep track of changes in multiple branches.

@abelsromero abelsromero force-pushed the issue-1160-deprecate-headerFooter-with-standalone-for-2.5.x branch from a51aa94 to 665660d Compare April 7, 2023 08:08
@abelsromero abelsromero force-pushed the issue-1160-deprecate-headerFooter-with-standalone-for-2.5.x branch 2 times, most recently from 1be876f to e330544 Compare April 7, 2023 19:52
* Replace headerFooter methods in OptionsBuild & Options
* Added 'standalone' description to docs
Other changes included:
* Re-ordered options in docs to follow alphabetical order
* Remove some unnecessary throws from tests
* Add missing '@deprecated' to templateDir method
* Add v2.5.x branch to run GH actions

Fixes asciidoctor#1160
@robertpanzer
Copy link
Member

Thank you!

@robertpanzer robertpanzer merged commit 71d8558 into asciidoctor:v2.5.x Apr 7, 2023
8 of 10 checks passed
@abelsromero abelsromero deleted the issue-1160-deprecate-headerFooter-with-standalone-for-2.5.x branch April 21, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants