elementary / elementary/granite
`Granite.CssClass.DESTRUCTIVE` and `Granite.CssClass.SUGGESTED` class names do not match pre-7.7.0 & Adw counterparts
- Dominant language
- Vala
- Stars
- 329
- Forks
- 65
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 31
Description
We probably should keep with adw's definition for the class for compatibility purposes, and we already were following it pre-7.7.0.
## destructive-action
```vala
/* granite/lib/Constants.vala */
/**
* Style class for {@link Gtk.Button} with a destructive action
*/
[Version (deprecated = true, deprecated_since = "7.7.0", replacement = "Granite.CssClass.DESTRUCTIVE")]
public const string STYLE_CLASS_DESTRUCTIVE_ACTION = "destructive-action";
/**
* Style class for {@link Gtk.Button} with a destructive action
*/
[Version (since = "7.7.0")]
public const string DESTRUCTIVE = "destructive";
```
[https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#destructive-action](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#destructive-action)
## suggested-action
```vala
/* granite/lib/Constants.vala */
/**
* Style class for when an action (usually a button) is the primary suggested action in a specific context.
*/
[Version (deprecated = true, deprecated_since = "7.7.0", replacement = "Granite.CssClass.SUGGESTED")]
public const string STYLE_CLASS_SUGGESTED_ACTION = "suggested-action";
/**
* Style class for when a {@link Gtk.Button} is the primary suggested action in a specific context.
*/
[Version (since = "7.7.0")]
public const string SUGGESTED = "suggested";
```
[https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#suggested-action](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#suggested-action)
Contributor guide
Research direction
Open granite/lib/Constants.vala and inspect the DESTRUCTIVE, SUGGESTED, and deprecated style-class constants. Compare their values with the linked libadwaita style-class documentation and the pre-7.7.0 compatibility described in the issue. Done means the public class names match the Adwaita counterparts while preserving the documented deprecation aliases.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100