Skip to content

Comments

feature/issue-105/adapt-color-scheme#144

Merged
Siyuan106 merged 25 commits intodevfrom
feature/issue-105/adapt-color-scheme
Jan 29, 2025
Merged

feature/issue-105/adapt-color-scheme#144
Siyuan106 merged 25 commits intodevfrom
feature/issue-105/adapt-color-scheme

Conversation

@GerardChabaBristol
Copy link
Collaborator

Issue(s):

#105

Type of change:

  • New feature

Description:

Created a color-blind mode feature, specifically blue-yellow color blindness (tritanopia).

Additional context:

The code will show variables called "red-green-colorblind", because we were working on that initially. However, the color blind palette was adjusted to cater to blue-yellow color blindness.

Testing instructions:

It has been tested and works perfectly.

Siyuan106 and others added 25 commits January 22, 2025 10:52
Added on-off button for color blind mode in SettingSidebar.vue.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Update App.vue to work with the color blind mode.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Updated SettingSidebar.vue to include the color blind palette.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Defined isColorblind in SettingSidebar.vue's data(): Added the isColorblind property to the data() of SettingSidebar.vue so it can track the toggle state.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
- Properly Communicate Between Components: Use the @colorblindToggled event emitted from SettingSidebar.vue to update the colorblindMode state in App.vue.

- Fix the toggleColorblindMode Method: Make sure the toggleColorblindMode method correctly toggles the isColorblind state and emits the event for the parent.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Added the global styles for the .red-green-colorblind class in the <style> section of your App.vue file.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Add the global color scheme styles, including default mode and colorblind mode.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Included a fallback mechanism for cases where the theme is not explicitly set, and the names of color schemes were adjusted.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Updated SettingSidebar.vue to work with color.js. 

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Updated App.vue to work with color.js.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
- Integrated getTheme from color.js to manage themes dynamically.
- Updated applyTheme method to set CSS variables using the selected theme.
- Replaced all hardcoded colors in the style section with CSS variables from the theme.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
- Incorporated getTheme to fetch the current theme's colors.
- Defined styles dynamically using themeStyles for elements like aside, button, h3, and textarea.
- Used :style bindings for aside, button, h3, and textarea to apply dynamic styles.
- Applied the default theme on mounted() to initialize the component's theme.|

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
- Used the getTheme function to dynamically fetch and apply theme colors.
- Defined styles for aside, button, and text elements using themeStyles.
- Applied :style bindings for aside, button, and h3 elements to reflect the theme dynamically.
- Set up the default theme on mounted() to initialize the component's styles.
- Ensured that all buttons, sidebar background, and text colors match the active theme.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Update code in HistorySidebar.vue, to fix the color blind mode.

Co-authored-by:
GerardChabaBristol<tl23383@bristol.ac.uk>
Update SettingSidebar to fix color blind mode.


Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Add code in ImportantSidebar.vue to fix the color blind scheme.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Change the color for the normal mode.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Change the color of button for normal mode.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Update code in SettingSidebar.vue to change the 'close' button's color in color blind mode.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Updated the color blind palette to cater for blue-yellow color blindness (tritanopia) since our main color is now IBM Blue.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Fixing the close button's color.

Co-authored-by: GerardChabaBristol <tl23383@bristol.ac.uk>
Updated the user chat bubble to pastel blue.

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
Changed folder directory location for color.js (line 40).

Co-authored-by: Siyuan106 <gr23994@bristol.ac.uk>
@GerardChabaBristol GerardChabaBristol added the Frontend Issue relates to frontend code. label Jan 29, 2025
@GerardChabaBristol GerardChabaBristol self-assigned this Jan 29, 2025
@GerardChabaBristol GerardChabaBristol linked an issue Jan 29, 2025 that may be closed by this pull request
Copy link
Contributor

@RainBOY-ZZX RainBOY-ZZX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Contributor

@Siyuan106 Siyuan106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color blind mode looks good!

@Siyuan106 Siyuan106 merged commit 1e0098e into dev Jan 29, 2025
1 check passed
@Siyuan106 Siyuan106 deleted the feature/issue-105/adapt-color-scheme branch January 29, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Issue relates to frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt the front-end color scheme

3 participants