Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color-Style System Re-Structuring and Colorblind Accessibility #1384

Closed

Commits on Apr 27, 2024

  1. feat: Add color scheme selection and colorblind modes to Preferences UI

    Add default and example color scheme objects to colors.json.
    
    Minify colors.json in build_data.js. Add colors.json to DataLoaderSystem's fileMap.
    
    Add color scheme helper functions to StyleSytem, with comments to describe each functions parameters and return values (where applicable).
    
    Update StyleSystem's styleMatch() function to interact with color scheme objects from colors.json rather than from STYLE_DECLARATIONS.
    
    Fix white space discrepancies in StyleSystem.
    
    Update color_selection.js and colorblind_mode_options.js to use StyleSystem rather than the non-existent ColorSystem.
    
    Uncomment color schemes and colorblind mode options sections in preferences.js to add them to the Preferences pane of the UI.
    
    Refs: Issue facebook#1230
    lauble authored and chinweibegbu committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    d588ad2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a85cbd View commit details
    Browse the repository at this point in the history
  3. refactor: Enable code to use the created color system

    Extract the style definitions to a separate folder, including style definitions which were in colors.json.
    
    Add abstracted color and style definitions to minification and data loading files.
    
    Load the style definitions alongside color loading in StyleSystem.js.
    
    Update style selectors to use newly abstracted style definitions.
    
    Map colors defined in the color system to their hex codes. in StyleSystem.js.
    
    Reduce the boilerplate code in style matching in StyleSystem.js.
    chinweibegbu committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    4b9a8e2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    51f6814 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    42d2c1d View commit details
    Browse the repository at this point in the history
  6. perf: Add default color scheme handling

    Add default color scheme property to StyleSystem.js to hold the default color scheme loaded from color_schemes.json.
    
    Abstract out HEX color code determination in styleMatch() into its own function, getHexColorCode.
    
    Define getHexColorCode() such that it fetches the HEX color code from the default color scheme if it is not defined in the current color scheme to increase efficiency and reduce the amount of information that has to be defined in a new color scheme object.
    
    Optimize color scheme definitions in color_schemes.json to utilize the performance upgrade in getHexColorCode() by removing key-value pairs already in the default color scheme.
    
    Add another example colorblind-friendly color scheme.
    
    Correct spelling mistake in helper function description.
    chinweibegbu committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    91a22f4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f1dde1c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ee9d116 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c1d70b3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1cacc04 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0285186 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ffa9393 View commit details
    Browse the repository at this point in the history
  13. feat: Hotkey for color scheme switching (ALT + SHIFT + C)

    NOTE: Also includes rebasing merge conflict handling
    chinweibegbu committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    dd711f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    468a851 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    ee35a89 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. Configuration menu
    Copy the full SHA
    376336c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d87956 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. feat: Make colorblind simulators a poweruser-only feature

    Add `showColorblindSimulators` to the array of poweruser features.
    
    Add strings for the `showColorblindSimulators` feature in the poweruser pop-up to `core.yaml`.
    
    Add `_initHide` property to `section.js` to enable initializing any section `<div>` with a `.hide` class in a non-permanent manner.
    
    Call the `initHide()` function with D3.js chaining to set the `_initHide` property of the to `true`, which means that `uiSectionColorblindModeOptions` section should initially be hidden.
    
    Add custom on-toggle behavior for `showColorblindSimulators` feature such that the state of the poweruser feature checkbox associated with it adds or removes the `.hide` class from the section's `<div>`.
    chinweibegbu committed May 14, 2024
    Configuration menu
    Copy the full SHA
    dcf234e View commit details
    Browse the repository at this point in the history