diff --git a/app/assets/stylesheets/bubbles.css b/app/assets/stylesheets/bubbles.css index 25b014300..608a8d2da 100644 --- a/app/assets/stylesheets/bubbles.css +++ b/app/assets/stylesheets/bubbles.css @@ -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); diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index 2c8cf0be5..974c9aec9 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -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 diff --git a/app/views/bubbles/_bubble.html.erb b/app/views/bubbles/_bubble.html.erb index 4945e02b6..033364ed5 100644 --- a/app/views/bubbles/_bubble.html.erb +++ b/app/views/bubbles/_bubble.html.erb @@ -6,12 +6,16 @@

- <%= 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" %> -
- <%= render "bubbles/tags", bubble: bubble %> -
+
+ <%= render "bubbles/tags", bubble: bubble %> +
+ <% end %> <% end %>

diff --git a/app/views/bubbles/show.html.erb b/app/views/bubbles/show.html.erb index 959f5093b..7f0f2793e 100644 --- a/app/views/bubbles/show.html.erb +++ b/app/views/bubbles/show.html.erb @@ -61,7 +61,7 @@
- <%= render "bubbles/bubble", bubble: @bubble %> + <%= render "bubbles/bubble", bubble: @bubble, editing: params[:editing] %>
<%= render "bubbles/messages", bubble: @bubble %>