Skip to content

fix: use domain as parameter#60

Merged
akselthomsen merged 5 commits intomainfrom
fix/use-domain
Dec 4, 2025
Merged

fix: use domain as parameter#60
akselthomsen merged 5 commits intomainfrom
fix/use-domain

Conversation

@akselthomsen
Copy link
Copy Markdown
Member

Pull request

Summary

Updated all internal example and tests templates to use {{domain}} instead of .self.

This PR is not optimal in the sense that the testing framework will be updated in #48, which means there are some quick fixes here that will be replaced very soon.

I considered implementing the {{domain}} in #48 as well, but thought it was better to keep it separate, even if this update is necessary for the unit test development to continue.

Changes Made

  • Updated all example components in inst/components. Implemented {{domain}} as param.
  • Likewise for unit tests components in tests/testthat/_components
  • Updated examples to also use domain when rendering the components.
  • Removed input argument from msr_test(). Using a temporary value = "domain" right now to test it. Will be completely replaced in the above mentioned PR.

Testing

  • Updated tests to also supply domain as rendering parameter
  • Skipping unit testing of the example components in inst/components due to the testing framework being updated as well. Once updated, these should pass.
  • Added helper expect_ady() function in test-component.R to reduce copy-paste code.

Checklist

  • Code changes have been tested
  • Documentation has been updated, if applicable
  • All automated tests pass
  • Coding style and naming conventions have been followed
  • The PR is ready for review and merge

@akselthomsen akselthomsen linked an issue Dec 2, 2025 that may be closed by this pull request
@akselthomsen akselthomsen marked this pull request as ready for review December 2, 2025 15:29
Copy link
Copy Markdown
Member

@matthew-phelps matthew-phelps left a comment

Choose a reason for hiding this comment

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

See my one comment, otherwise GTG

@github-actions[bot]
Copy link
Copy Markdown
Mannequin

github-actions[bot] mannequin commented Dec 4, 2025

Github pages

Review the pkgdown webpage for the PR here

@github-actions[bot]
Copy link
Copy Markdown
Mannequin

github-actions[bot] mannequin commented Dec 4, 2025

Code coverage

Name Coverage (%)
mighty.component 100
R/component.R 100
R/custom_r.R 100
R/mighty_component_rendered.R 100
R/mighty_component.R 100
R/standard.R 100
R/utils-validation.R 100

@akselthomsen akselthomsen merged commit 13c2008 into main Dec 4, 2025
@akselthomsen akselthomsen deleted the fix/use-domain branch December 4, 2025 10:04
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] Use {{domain}} instead go .self in components

3 participants