Skip to content

Commit

Permalink
Reorganize and communicate experimental status
Browse files Browse the repository at this point in the history
Following Go `x` convention seen across various projects, the former `accessibility` package has been relocated to communicate its experimental status more clearly to extension authors.

It has also been renamed to `color` to align with adopting Primer Style color role functionality.
  • Loading branch information
andyfeller committed Mar 7, 2025
1 parent e05c340 commit 00be578
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package accessibility
package color

import (
"os"
Expand All @@ -14,13 +14,13 @@ const (
AccessibleColorsSetting = "accessible_colors"
)

// IsAccessibleColorsEnabled returns true if accessibility colors are enabled via environment variable
// or configuration settings.
// IsAccessibleColorsEnabled returns true if accessible colors are enabled via environment variable
// or configuration setting with the environment variable having higher precedence.
//
// If the environment variable is empty, "0", or "false", the accessibility colors are disabled.
// Any other value enables the accessibility features.
// If the environment variable is empty, "0", or "false", the accessible colors are disabled.
// Any other value enables the accessibility feature.
//
// Note that this environment variable supercedes the configuration file's accessible setting.
// Note this is an experimental feature that is subject to change.
func IsAccessibleColorsEnabled() bool {
envVar := os.Getenv(AccessibleColorsEnv)
if envVar != "" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package accessibility
package color

import (
"testing"
Expand Down
4 changes: 4 additions & 0 deletions pkg/x/x.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// `x` is a collection of experimental features being used within the GitHub CLI following common Go conventions.
//
// Anything contained is subject to change without notice until it is considered stable enough to be promoted.
package x

0 comments on commit 00be578

Please sign in to comment.