-
Notifications
You must be signed in to change notification settings - Fork 0
solution: day 1 - task 3 #2
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
base: day-1
Are you sure you want to change the base?
Conversation
smartlime
commented
Jul 29, 2023
- Не стал создавать вложенный контроллер треков, но, по идее, было бы чище.
- "Матрешка" из фреймов все равно получается, и без нее выйдет только через стрим, как мне кажется.
- Не стал сильно красиво делать пагинацию, по идее, не суть.
- Пренебрег тем, что после последней страницы будет пустой запрос.
palkan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не стал создавать вложенный контроллер треков, но, по идее, было бы чище.
Определённо)
Ну да ладно, по основной задаче всё сделано.
| <span class="track--number--text track--playing-indicator"></span> | ||
| <% else %> | ||
| <%= track_counter + 1 %> | ||
| <%= offset + track_counter + 1 %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| @@ -0,0 +1,12 @@ | |||
| <%# locals: (artist:, tracks:, page: params[:page].to_i) -%> | |||
| <%= turbo_frame_tag dom_id(artist, :tracks) do %> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, тут не хватает target — что будет с кликом по треку?
| <ul class="tracks"> | ||
| <%= render tracks, enqueueble: true, offset: page * 10 %> | ||
| </ul> | ||
| <%= turbo_frame_tag dom_id(artist, :tracks), target: "_self", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Интересная идея с target: "_self", но тот же вопрос про клики по трекам остается. Можно, конечно, представить, что мы их уже переделали на стримы.. Но сейчас явно будет глючить.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дааа. из-за target-ов глючит нещадно! Действительно, клики... Попробую на досуге доработать, кажется, что тут еще надо подумать, как упаковать фреймы.