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

Documented test helper, rendered_component, renaming #1375

Closed
tysongach opened this issue Jun 1, 2022 · 3 comments
Closed

Documented test helper, rendered_component, renaming #1375

tysongach opened this issue Jun 1, 2022 · 3 comments

Comments

@tysongach
Copy link
Contributor

👋 Hi!

I’m noticing that the rendered_component test helper, which is documented in the Testing guide on viewcomponent.org, was renamed suddenly in v2.56.0 (and v2.56.1). That caught me off-guard coming in through a minor (and patch) release update.

Does ViewComponent stick to SemVer? Or is rendered_component/rendered_content considered private?

@joelhawksley
Copy link
Member

joelhawksley commented Jun 1, 2022

@tysongach we do our best to stick to SemVer, but missed this one.

The method is marked as private and only snuck into the docs incidentally. I could see us making it public. I'd prefer to push folks towards using the standard page that is standard practice in Capybara-compatible tests, though ❤️

What do you think we should do?

@rmacklin
Copy link
Contributor

rmacklin commented Jun 1, 2022

Quoting myself from another thread:

It's worth noting that the method was introduced and documented (as part of the public interface of ViewComponent::TestHelpers) in May 2020 while the @private designation wasn't added until September 2021: 4eef237#diff-d66a35a69a27f26d54c6db1034c0a6b61e5df8df60e12c7030d97fe28faae9e2

Given that, I'm wondering if we should add a rendered_component alias back (which we could mark as deprecated).

@tysongach
Copy link
Contributor Author

we do our best to stick to SemVer, but missed this one.

That’s okay - it happens 🙂

The method is marked as private and only snuck into the docs incidentally.

Ah - thanks for the clarity!

I could see us making it public. I'd prefer to push folks towards using the standard page that is standard practice in Capybara-compatible tests, though ❤️

What do you think we should do?

I think you’re spot on about using page. I’m just a humble design engineer and was following the docs literally, but using pages makes a lot of sense!

It feels like there are folks besides just me talking about this rename and it causing issues for them. Given that, I wonder if next steps could be:

  1. Bring back rendered_component or alias it, so that v2.x of view_component matches the existing docs and user expectations
  2. Deprecate rendered_component and provide a helpful message encouraging folks to use page instead
  3. Update docs to indicate that rendered_component is deprecated
  4. Remove rendered_component in v3.0 and remove deprecations

joelhawksley added a commit that referenced this issue Jun 2, 2022
claudiob pushed a commit to claudiob/view_component that referenced this issue Dec 22, 2023
claudiob pushed a commit to claudiob/view_component that referenced this issue Jan 3, 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

No branches or pull requests

3 participants