statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.11k stars 538 forks source link

You can no longer see which option is selected in the 'Button Groups' type in the CP #11029

Open nunoc66 opened 3 weeks ago

nunoc66 commented 3 weeks ago

Bug description

If you select an option in a button group, it gets saved and shows up in the DB, but the styles on the screen don't show which option is selected. This happens in light and dark modes.

How to reproduce

Create a blueprint that uses a button group with multiple choices. Choose an option and notice that the unselected buttons look the same as the selected one.

Logs

No response

Environment

Cache
Config: CACHED
Events: CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: postmark
Queue: sync
Session: database

Statamic
Addons: 1
Sites: 2 (...)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.35.0 PRO

Statamic Addons
statamic/eloquent-driver: 4.15.2

Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: eloquent
Collection Trees: file
Collections: eloquent
Entries: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: file
Navigation Trees: file
Navigations: eloquent
Revisions: eloquent
Sites: file
Taxonomies: eloquent
Terms: eloquent
Tokens: file

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

jackmcdade commented 3 weeks ago

Hmmmm, I can't recreate this. What browser are you in? Do you have any extensions installed? Do you have the button group inside another field (e.g. grid, replicator, group)?

image

duncanmcclean commented 3 weeks ago

Also, are you able to provide the options you have configured for the button group field? Either a screenshot or the YAML from the blueprint will do.

nunoc66 commented 3 weeks ago

Hmm.. that's interesting. I did confirm it's savings it properly, so the issue for me is just the UI.

Is it my config for the button group and the list of options: image

And here's what it looks like in my entry. I imagine it's missing a class (option 5 is selected here): image

Thanks for your help!

duncanmcclean commented 3 weeks ago

Can you try re-saving the "News Importance" field in your blueprint to see if that makes a difference?

nunoc66 commented 3 weeks ago

Unfortunately it doesn't appear to have changed anything.

duncanmcclean commented 3 weeks ago

Can you provide the field array that gets saved to the blueprints table so we can see how it is saved?

morhi commented 2 weeks ago

I added the PR #10916 which solves this issue.