Open the title field for editing after creating a new bubble

This commit is contained in:
Jason Zimdars
2024-12-16 16:59:31 -06:00
parent 6157cfcdc0
commit 520bead27f
4 changed files with 16 additions and 7 deletions
+5
View File
@@ -330,6 +330,11 @@
color: var(--splat-color);
}
textarea::selection {
background-color: var(--bubble-color);
color: var(--color-ink-reversed);
}
@media (hover: hover) {
.bubble:has(.bubble__image img:not([src=""])):hover & {
color: var(--color-ink-reversed);
+1 -1
View File
@@ -12,7 +12,7 @@ class BubblesController < ApplicationController
def create
@bubble = @bucket.bubbles.create!
redirect_to @bubble
redirect_to bucket_bubble_path(@bubble.bucket, @bubble, editing: true)
end
def show
+9 -5
View File
@@ -6,12 +6,16 @@
<div>
<h1 class="bubble__title">
<%= turbo_frame_tag bubble, :edit do %>
<%= link_to bubble.title, edit_bucket_bubble_path(bubble.bucket, bubble), class: "txt-undecorated" %>
<% if local_assigns[:editing] %>
<%= turbo_frame_tag bubble, :edit, src: edit_bucket_bubble_path(bubble.bucket, bubble) %>
<% else %>
<%= turbo_frame_tag bubble, :edit do %>
<%= link_to bubble.title, edit_bucket_bubble_path(bubble.bucket, bubble), class: "txt-undecorated" %>
<div class="bubble__tags flex flex-wrap align-end justify-center gap-half txt-tight-lines">
<%= render "bubbles/tags", bubble: bubble %>
</div>
<div class="bubble__tags flex flex-wrap align-end justify-center gap-half txt-tight-lines">
<%= render "bubbles/tags", bubble: bubble %>
</div>
<% end %>
<% end %>
</h1>
</div>
+1 -1
View File
@@ -61,7 +61,7 @@
<div class="bubble__container">
<div class="bubble__perma flex justify-center center margin-block-end-double">
<%= render "bubbles/bubble", bubble: @bubble %>
<%= render "bubbles/bubble", bubble: @bubble, editing: params[:editing] %>
</div>
<%= render "bubbles/messages", bubble: @bubble %>