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

Consistent Theme Styling for Annotations + auto update on change #150

Merged
merged 19 commits into from
Jul 4, 2023

Conversation

JoeAtHPI
Copy link
Collaborator

@JoeAtHPI JoeAtHPI commented Jul 2, 2023

Currently, many colors are hardcoded throughout the code. This leads to hardly readable, or unreadable text depending on the theme, e.g. the grey of the buttons in a dark theme
Screenshot 2023-05-16 193223
or backgrounds were inconsistent
Screenshot 2023-05-31 140808

With this MR, colors adjust themselves to the theme and change automatically when a new change is applied.
Many applyUserInterfaceTheme and UI constants were added. As the values morph for Probes was different with each class, fullfilling the same purpose, they were extracted into their own classes. BPBrowser now invalidates itself when a theme changed. This is because in the scenario

  1. Browser display method a with probes
  2. User switches to method b
  3. User switches theme
  4. User goes back to a
    the probes in a would still have the old theme as they were not rendered before.

Below are two example themes.

Screenshot 2023-06-01 164550
Screenshot 2023-06-01 164915
Screenshot 2023-05-31 200753

@JoeAtHPI JoeAtHPI added bug Something isn't working enhancement New feature or request labels Jul 2, 2023
@JoeAtHPI JoeAtHPI self-assigned this Jul 2, 2023
@coveralls
Copy link

coveralls commented Jul 2, 2023

Pull Request Test Coverage Report for Build 5454038473

  • 4 of 24 (16.67%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 65.066%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/Babylonian-ProbeLog.package/BPSwimlane.class/instance/newBackUpTitleMorphFor..st 0 1 0.0%
packages/Babylonian-ProbeLog.package/BPSwimlaneLineMorph.class/instance/textColor.st 0 4 0.0%
packages/Babylonian-ProbeLog.package/BPLabelMorph.class/instance/applyUserInterfaceTheme.st 0 6 0.0%
packages/Babylonian-ProbeLog.package/BPSwimlaneLineMorph.class/instance/applyUserInterfaceTheme.st 0 9 0.0%
Totals Coverage Status
Change from base Build 5410672123: -0.7%
Covered Lines: 1192
Relevant Lines: 1832

💛 - Coveralls

@JoeAtHPI JoeAtHPI requested a review from ekrebs5 July 2, 2023 22:59
Copy link
Member

@ekrebs5 ekrebs5 left a comment

Choose a reason for hiding this comment

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

grafik

Looks good in general, just have a few inputs:

  • it tries to readd the printbugger package; this is the probelog now
  • see comment that one color could be extracted to its own function
  • as seen in the screenshots, dark themes such as Monokai (dark) retain a light color for some Babylonian Morphs if the browser is open during the change; can this be fixed or will a browser reopen be neccessary here?

.smalltalk.ston Outdated Show resolved Hide resolved
@JoeAtHPI
Copy link
Collaborator Author

JoeAtHPI commented Jul 4, 2023

@ekrebs5 did you mean the printbugger in the .ston? or elsewhere?

@JoeAtHPI JoeAtHPI requested a review from ekrebs5 July 4, 2023 11:15
@JoeAtHPI JoeAtHPI merged commit 0800891 into develop Jul 4, 2023
4 checks passed
@JoeAtHPI JoeAtHPI deleted the error/theme-styling branch August 9, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants