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

Remove unecessary `` around LiveView and LiveComponent from docs #3240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c4710n
Copy link
Contributor

@c4710n c4710n commented May 11, 2024

I found most of "LiveView" and "LiveComponent" in the doc is not wrapped by ``.

This PR:

  • remove the `` around LiveView and LiveComponent, to keep their format consistent.
  • fix small typos, such as:
    • Log -> log

@SteffenDE
Copy link
Collaborator

Note that there is indeed a difference between LiveView wrapped in backticks and not. When wrapping it in backticks it links back to the specific module. So often when referring to LiveView in backticks one talks about the usage of the LiveView module instead of LiveView in general. So I’m not sure if this is actually correct.

@c4710n
Copy link
Contributor Author

c4710n commented May 11, 2024

Hey, @SteffenDE. Thanks for your quick response.

When wrapping it in backticks it links back to the specific module.

I give it a try. It seems that the backlinks only work when we writes:

`Phoenix.LiveView`

It doesn't work with:

`LiveView`

I think that:

  • when we talking about LiveView as a technique name, it's ok to use the term "LiveView" without ``.
  • but, when we talking about the specific implementation, it's better to use the module name with ``, like:
`Phoenix.LiveView`

The scenario in the PR should be the first one.
And, there are lots of docs written in this way. Try to search _LiveView_ (replace _ with space) to see them all.

@SteffenDE
Copy link
Collaborator

Good point with the backlinks only working with the full module name. I only wanted to point out that including the backticks could indeed be intentional.

When in doubt, I’d wait for a comment from Chris or José. They wrote most of the changelog so they should know best :)

Copy link
Contributor

@rhcarvalho rhcarvalho left a comment

Choose a reason for hiding this comment

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

👍

I agree with @c4710n's interpretation on where "LiveView" and "LiveComponent" refer to the general concept and not to a particular module or code reference.

When a `LiveView` is rendered, its contents are wrapped in a container. By default,
the container is a `div` tag with a handful of `LiveView` specific attributes.
When a LiveView is rendered, its contents are wrapped in a container. By default,
the container is a `div` tag with a handful of LiveView specific attributes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
the container is a `div` tag with a handful of LiveView specific attributes.
the container is a `div` tag with a handful of LiveView-specific attributes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@c4710n c4710n changed the title [Doc Improvement] Remove unecessary `` around LiveView and LiveComponent Remove unecessary `` around LiveView and LiveComponent from docs May 16, 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.

None yet

3 participants