Skip to content

Comments

Scope CableReady custom HTML elements and view helpers#252

Merged
marcoroth merged 3 commits intomainfrom
scope-cable-ready-custom-elements
Feb 14, 2023
Merged

Scope CableReady custom HTML elements and view helpers#252
marcoroth merged 3 commits intomainfrom
scope-cable-ready-custom-elements

Conversation

@marcoroth
Copy link
Member

Type of PR

Consistency Enforcement

Description

Similarly to #250 this pull requests scopes the custom HTML elements and view helpers with the cable_ready name.

Custom Elements:

  • <stream-from> -> <cable-ready-stream-from>
  • <updates-for> -> <cable-ready-updates-for>

There's nothing to migrate here, since those element names were just used under the hood.

CableReady::ViewHelper view helpers

  • stream_from -> cable_ready_stream_from

    -<%= stream_from Photo %>
    +<%= cable_ready_stream_from Photo %>
  • updates_for -> cable_ready_updates_for

    -<%= updates_for @feed, :comments do %>
    +<%= cable_ready_updates_for @feed, :comments do %>
      <%= render @feed.comments %>
    <% end %>
  • updates_for_if -> cable_ready_updates_for_if

    -<%= updates_for_if @feed.updates?, @feed, :comments do %>
    +<%= cable_ready_updates_for_if @feed.updates?, @feed, :comments do %>
      <%= render @feed.comments %>
    <% end %>

Why should this be added

The names are super generic and didn't indicate that they were originating from CableReady. Especially the stream_from is very confusing, because ActionCable also uses such method.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@marcoroth marcoroth force-pushed the scope-cable-ready-custom-elements branch from b6da4bb to e0f53a4 Compare February 14, 2023 16:01
@marcoroth marcoroth merged commit 5efa649 into main Feb 14, 2023
@marcoroth marcoroth deleted the scope-cable-ready-custom-elements branch February 14, 2023 16:02
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.

1 participant