FIX: improvements for user custom sections (#20190)

Improvements for this PR: https://github.com/discourse/discourse/pull/20057

What was fixed:
- [x] Use ember transitions instead of full reload
- [x] Link was inaccurately kept active
- [x] "+ save" renamed to just "save"
- [x] Render emojis in link name
- [x] UI to set icon
- [x] Delete link is trash icon instead of "x"
- [x] Add another link to on the left and rewording
- [x] Raname "link name" -> "name", "points to" ->  link
- [x] Add limits to fields
- [x] Move add section button to the bottom
This commit is contained in:
Krzysztof Kotlarek
2023-02-08 11:45:34 +11:00
committed by GitHub
parent 9a45b59fb5
commit 6e1f3e0023
19 changed files with 177 additions and 127 deletions

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddIconToSidebarUrls < ActiveRecord::Migration[7.0]
def change
add_column :sidebar_urls, :icon, :string
end
end

View File

@@ -0,0 +1,10 @@
# frozen_string_literal: true
class AddLimitsToSidebarSectionsAndSidebarUrls < ActiveRecord::Migration[7.0]
def change
change_column :sidebar_sections, :title, :string, limit: 30, null: false
change_column :sidebar_urls, :icon, :string, limit: 40, null: false
change_column :sidebar_urls, :name, :string, limit: 80, null: false
change_column :sidebar_urls, :value, :string, limit: 200, null: false
end
end