Skip to content

[Hotfix]: new section works when custom is FALSE#455

Open
Schiano-NOAA wants to merge 6 commits into
mainfrom
hotfix-new-sec
Open

[Hotfix]: new section works when custom is FALSE#455
Schiano-NOAA wants to merge 6 commits into
mainfrom
hotfix-new-sec

Conversation

@Schiano-NOAA
Copy link
Copy Markdown
Collaborator

What is the feature?

How have you implemented the solution?

  • add condition in create_template that overwrites custom to FALSE when the user sets new_section or custom_sections and forgets to set custom = TRUE

Does the PR impact any other area of the project, maybe another repo?

  • no

@Schiano-NOAA Schiano-NOAA linked an issue May 1, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Checklist

  • PR base branch is accurate
  • Is the code concise?
  • Comments are clear and useful.
  • Can you remove or combine any arguments?
  • Do argument contain defaults (if appliable)?
  • Code is documented and example provided (Roxygen).
  • Did you make a test (testthat)?
  • Was this tested under multiple scenarios?
  • Did you run devtools::check()?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

New version checklist

  • Package version in DESCRIPTION has been updated
  • Release notes have been drafted/published
  • Cheatsheet content has been updated (if applicable)
  • Cheatsheet version has been updated

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Code Metrics Report

Coverage Code to Test Ratio Test Execution Time
33.8% 1:0.2 25s

Code coverage of files in pull request scope (38.7%)

Files Coverage
R/create_template.R 38.7%

Reported by octocov

@sbreitbart-NOAA
Copy link
Copy Markdown
Collaborator

Woops, put my comment on the issue instead of the PR 😅 #452 (comment)

Copy link
Copy Markdown
Collaborator

@sbreitbart-NOAA sbreitbart-NOAA left a comment

Choose a reason for hiding this comment

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

Looks good to me! I mentioned a different error on the issue itself but understand if you'd prefer to make that a separate PR.

Copy link
Copy Markdown
Collaborator

@sbreitbart-NOAA sbreitbart-NOAA left a comment

Choose a reason for hiding this comment

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

Thanks for working on this issue! Nearly everything looks good. However, when testing the example in the issue, it doesn't render because both of the new sections' code chunks have the same label: example_chunk_1. I think this will confuse users. One way to avoid duplicating labels would be to make the chunk label identical to the section name + 1, or to remove the code chunks from the new sections entirely.

@Schiano-NOAA
Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA oh good call! I'll remove them entirely because they shouldn't be needed.

@Schiano-NOAA
Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA the issue should be fixed now. I'll merge this in after dev and push this to v1.0 branch as a hotfix as well.

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.

[Bug]: option "in" for new section location not working

2 participants