Commit Graph

16 Commits

Author SHA1 Message Date
Donovan Daniels
4ff4c3718e
[DText] Explicitly set when color is allowed in preview (#665) 2024-07-20 10:19:40 -07:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Earlopain
14b0327ffc
[DText] Rework how the input gets constructed
I want to switch over to svg icons but the current one doesn't allow
for it because it uses unicode to set the icons.
Make it instead use rails rendered html which can then be switched out
for the svg icon helper
2023-08-12 21:00:30 +02:00
Earlopain
cc379af5eb
[Search] Add custom input type for users
Automatically adds name/id search
2023-08-04 20:46:59 +02:00
Earlopain
83ad5f34ac
[Search] Automatically add id/created_at/updated_at inputs
This won't be correct in some cases but the large majority will make sense
2023-05-07 13:26:20 +02:00
Earlopain
f629e394ca
[Search] Add search fields that only show when they have a value
Also add it to a few places I could quickly find that can make use of this.
2023-02-18 17:53:12 +01:00
Earlopain
9a852c82e1
[ForumPosts] Fix reply not quoting
`form_for`, which `simple_form_for` uses under the hood, generates
duplicate html ids when the form is generated multiple times.
This is bad, since quoting uses this id to fill the reply.
Instead it would put it into the first editable textarea.
2022-08-11 17:52:13 +02:00
Earlopain
9d9b353e3f
[Forms] Simplify button_select implementation
It now behaves like all the other simple form input fields. It's also
available in both the search builder and custom builder automatically.
Turns out I was passing the label/value in reverse, whoops.
2022-08-05 19:48:18 +02:00
Earlopain
bd563562b0
[Forms] Replace dtext_field with custom simple_form input 2022-08-05 18:39:13 +02:00
Earlopain
619754283b
[Forms] Add displaying dropdowns as button selects
The first user of this is creating user feedback,  where you have 3 buttons
Also default to negative feedback when linking to create on user pages
2022-07-13 23:35:36 +02:00
Earlopain
f7e6985c82
[Forms] Insert autocomplete through a shortcut property 2022-07-13 21:12:37 +02:00
Earlopain
87500a4f01
[Forms] Use a custom form builder
This will  make it possible to write some custom logic and use it everywhere,
like generating submit buttons with text depending on the model state
2022-07-13 20:48:14 +02:00
Earlopain
ff5dc78cf4
[Tags] Convert "Hide empty?" to checkbox
Also added option for a default value and made checkbox inputs
react to "truthy" for  backwards compatability
2022-07-10 16:09:24 +02:00
Earlopain
c2d7fff320
[Search] Only show form on load if any form value is filled 2022-04-02 21:23:43 +02:00
Earlopain
212d6e3727
[Search] Automatically set values from url search params
Setting them every time manually is cumbersome, and a few places didn't even do it.
This also adds a shorthand for setting the autocomplete attribute
2022-04-02 21:23:28 +02:00
Earlopain
1eff0215ac
[Layout] Fix boolean styling in simple_form 2022-03-30 16:57:51 +02:00