Skip to content

#19461 Rework Shout Preferences#19464

Open
belaroesener wants to merge 5 commits intopharo-project:Pharo14from
belaroesener:improvement/rework-shout-preferences
Open

#19461 Rework Shout Preferences#19464
belaroesener wants to merge 5 commits intopharo-project:Pharo14from
belaroesener:improvement/rework-shout-preferences

Conversation

@belaroesener
Copy link
Copy Markdown
Contributor

I reorganized the Shout Preferences around the predefined styles already available, adding two special styles Custom and Default.
Default represents the style for the currently selected UI Theme and will change if the UI Theme changes.
Custom represents the style editable via the SettingBrowser and can be initialized by copying it from any of the other styles.

I fixed the problems described in #19461:

  • With the new system, when loading a UI Theme, the current style is only changed to the Theme default, if the currently selected style is Default
  • I send #themeChanged to the world whenever any of the style elements is changed in the SettingBrowser. This works but I would be happy for any suggestions to make it work better, as this solution seems somewhat inefficient.
  • I replaced SHStyleElement with two new classes, that manage the state in a different way, and do not exhibit the same problems.
  • The emphasis bold italic now works

- Reorganize the syntax highlighting settings around the predefined styles
- Create two new predefined styles `Custom` and `Default` with special behaviour
- Modify logic for switching the UITheme so that changing it only switches the style if the current style is `Default`
- Fix emphasis `bold italic` 
- Make open code editors reflect changes to the `Custom` style directly
- Reorganize the inner workings of `SHPreferences`
- Replace `SHStyleElement` with `SHCustomStyle` and `SHCustomStyleElement`
- Remove unused methods from `SHPreferences class`
- Remove obsolete comments and todos
- Add descriptions for settings
- Fix formatting
@jecisc
Copy link
Copy Markdown
Member

jecisc commented Mar 25, 2026

@demarey and @estebanlm are currently working on the SettingBrowser.

Maybe they can be interested to review this PR

@estebanlm
Copy link
Copy Markdown
Member

is this working in the context of the new settings browser ?

Comment thread src/Shout/SHCustomStyle.class.st Outdated
SHCustomStyle class >> color: aColor forGroup: aGroupName [

(groups at: aGroupName) at: #color put: aColor.
SHPreferences cutomStyleChanged
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It feels like a typo

@Ducasse
Copy link
Copy Markdown
Member

Ducasse commented Mar 25, 2026

Hi belaroesener

If you have some cycles for another PR after we integrate this one.
I would love to see all the symbols used in all Shout turned into strings because these symbols are unnecessary and polutes de symbol space.
This is on my todo but it is kind of infinite in this moment.

Tx

@belaroesener
Copy link
Copy Markdown
Contributor Author

is this working in the context of the new settings browser ?

This PR addresses the Issues I had with the old settings browser. I had not followed the development of the new setting browser, but now I am realizing that it is the default Browser in Pharo14? (I always use CMD-, to open the settings browser, but this still opens the old browser).

The style elements use special widgets, from my understanding the logic used by the new browser is a bit different for this. I'll look into it

@belaroesener
Copy link
Copy Markdown
Contributor Author

Hi belaroesener

If you have some cycles for another PR after we integrate this one. I would love to see all the symbols used in all Shout turned into strings because these symbols are unnecessary and polutes de symbol space. This is on my todo but it is kind of infinite in this moment.

Tx

Sure, could you elaborate a bit on what symbols you mean?

@jecisc
Copy link
Copy Markdown
Member

jecisc commented Mar 26, 2026

I think he is refering to the methods with the pragma #styleTable:

For example:

^ #(
			(default 								('657A81' muchDarker))
			...
)

This will create symbols. He would like it to become

^ #(
			('default' 								('657A81' muchDarker))
			...
)

This is what I understood. Maybe Steph can confirm

@Ducasse
Copy link
Copy Markdown
Member

Ducasse commented Apr 3, 2026

Yes I refered to this list of symbols.

@Ducasse
Copy link
Copy Markdown
Member

Ducasse commented Apr 7, 2026

Hello did you see my comment? cutom has a typo.

@belaroesener
Copy link
Copy Markdown
Contributor Author

@Ducasse Yes, it's a typo. Thanks, I'll fix it.

@Ducasse
Copy link
Copy Markdown
Member

Ducasse commented Apr 11, 2026

Thanks. Can you check the conflict?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants