Insufficient overriding mechanism

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
tetzla
Posts: 16
Joined: 29 Apr 2021, 13:10

20 Apr 2022, 15:36

Hello,

the overriding mechanism for theme and layout variables seems to be insufficient:
  • Overrides are not possible (merely new variable definitions = extension), because overrides are imported before defaults.
  • Overrides cannot be defined specifically for light/dim/dark schemes, because there are no scheme specific overrides files.

see /resources/sass/theme/_theme_<scheme>.scss:
current code

Code: Select all

@import '../overrides/_theme_variables';
@import '../variables/theme/_theme_<scheme>';
suggested code

Code: Select all

@import '../variables/theme/_theme_<scheme>';
@import '../overrides/_theme_variables_<scheme>';
see /resources/sass/layout/_layout_<scheme>.scss
current code

Code: Select all

@import '../overrides/_layout_variables';
@import '../variables/layout/_layout_<scheme>';
suggested code

Code: Select all

@import '../variables/layout/_layout_<scheme>';
@import '../overrides/_layout_variables_<scheme>';
Regards tetzla

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

27 Apr 2022, 11:40

Thanks a lot for your report! Fixed now.

Best Regards,

tetzla
Posts: 16
Joined: 29 Apr 2021, 13:10

28 Apr 2022, 09:23

Hello,

thanks a lot. Which version fixes the problem? When will the version be released?

Regards tetzla

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Apr 2022, 09:50

Hi,

Fixed for v3.1.1. I plan to release it next week.

Best Regards,

miedrl
Posts: 8
Joined: 22 Jul 2021, 13:21

30 May 2022, 10:20

mert.sincan wrote:
28 Apr 2022, 09:50
Hi,

Fixed for v3.1.1. I plan to release it next week.

Best Regards,
Hi,

Diamond version 4 has been released but in my opinion this problem has not been fixed correctly. The override variables are indeed loaded after the default variables but there is still no possibility to separate the override variables into light, dim and dark scheme as @tetzla suggested.

The current code of /resources/sass/theme/_theme_<scheme>.scss looks like this:

Code: Select all

@import '../variables/theme/_theme_<scheme>';
@import '../overrides/_theme_variables';
I support @tezla's suggestion to adapt the code as follows:

Code: Select all

@import '../variables/theme/_theme_<scheme>';
@import '../overrides/_theme_variables_<scheme>';
Regards, miedrl

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

31 May 2022, 13:49

Hi,

I think this is related to your needs. Most Users use only one option for the theme and remove other files from the app. If you want to use all options, you can create overriding variables and style files for them.

Best Regards,

tetzla
Posts: 16
Joined: 29 Apr 2021, 13:10

21 Jul 2022, 15:00

I would not agree to your opinion. Many applications provide a light and a dark theme to suit the user's taste and to improve accessibility.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

12 Aug 2022, 20:25

Sorry for the delayed response! I'll talk about it with my teammate and get back to you.

Best Regards,

Post Reply

Return to “Diamond - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests