Coder Social home page Coder Social logo

helium-theme's Introduction

Helium Theme

teaser

Overview

Designed from scratch, Helium theme provides a modern look and feel and customization capabilities. Main features:

Color Presets

CSS variables are used for colors. As a result, it's possible to apply different color presets on the fly, without theme recompilation and app restart. There are two color presets provided out of the box - light and dark.

To manage presets available for end-users modify the following properties in web-app.properties

cuba.theme.helium.modes = light|dark
cuba.theme.helium.defaultModeToUse = light

Also, you can create your own color presets using the online theme editor (see below).

Size Presets

There are three built-in presets for size: small, medium and large:

Similarly to the colors presets, you can modify presets for sizes in web-app.properties via the following properties:

cuba.theme.helium.sizes = small|medium|large
cuba.theme.helium.defaultSizeToUse = medium

Per-user settings

A user can set the desired color and size preset in settings screen (Help > Theme Settings). There is the helium-theme-minimal role that enables access to the settings screen.

Installation

Install add-on from marketplace or by the following coordinates, using CUBA Studio:

com.haulmont.addon.helium:helium-global:<version>

Pick a version which is compatible with the platform version used in your project:

Platform Version Add-on Version
7.2.4+ 0.4.x
7.1.5+ 0.1.x

Theme Editor

Theme editor allows you to easily create custom color presets.

Applying Custom Color Preset

To add a color preset you will need to extend the Helium theme. You can easily do it in Studio: in the main menu click CUBA > Advanced > Manage Themes > Create Theme Extension. Select helium in the dropdown.

Once theme extension is created, place generated CSS variables in helium-ext.scss file, e.g.:

@mixin com_company_demo-helium-ext {
  /* Basic */
  --primary-color: #0097D8;
  --primary-color_rgb: 0, 151, 216;

  /* Common */
  --primary-color-shade-1: #0084BD;
  --primary-color-shade-2: #0076A8;
  --primary-dim-color: #2EC0FF;

  &.dark {
    /* Common */
    --primary-dim-color: #195b7c;
  }
}

Browser Compatibility

Helium works in the latest versions of modern browsers that support CSS variables. IE 11 is not supported out of the box since it does not support CSS variables. It is possible to use polyfill for IE 11, however, it is not tested and may cause performance issues

helium-theme's People

Contributors

glebfox avatar web-devel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pierresj

helium-theme's Issues

Improve color naming

  • Swap --text-color and --text-medium-color.
  • Rename --primary-disabled-color.
  • Rename --read-only-color.

Incorrect date displaying in DataGrid inline editor

based on forum's question

Enviroment:

CUBA Platform version: 7.2.13
CUBA Studio plugin version: 15.0.SNAPSHOT2712-202
IntelliJ version: IntelliJ IDEA 2021.1 (Community Edition)
Helium add-on v.0.3.1

TC:

  1. Create new project
  2. Add Helium add-on
  3. Create new entity with LocalDateTime field -> generate standard screens -> choose DataGrid in browser screen -> finish
  4. Open entity browser -> add to datagrid 'stylename="small"'
  5. Run app -> open Settings -> choose theme Helium -> logout and login
  6. Open entity browser -> Create new instance -> save
  7. Double-click created instance

AR:

image

Add the ability to change theme default values

Description

It would be very useful if we could configure theme defaults like application properties. For instance,

cuba.theme.defaultModeToUse = dark
# or
cuba.theme.defaultSizeToUse = small

Typo in side-menu variables

  /* SideMenu */
--sedemenu-item-selected-background-color: #003ED5;
--sedemenu-item-selected-color: #0090CE;

(sede instead of side)

QA

Please also check the above variables work in the side menu.

Consider applying primary style to button with primary action

See action's primary attribute.

Steps to reproduce

  • set $cuba-highlight-primary-action:true;
  • wire button to primary action
    <actions>
        <action id="primaryAction" primary="true"/>
    </actions>
    <layout>
        <button action="primaryAction" caption="Button with primary action"/>
    </layout>

Button is not highlighted.
Also consider to set $cuba-highlight-primary-action to true by default in Helium.

DateField does not hide required indicator

If the datefield is indicated as not editable its requirement indicator is not hidden. I don't know if it should be hidden or not, since in the other types of components the indicator is not shown if they are read-only. In the image you can see.

image

Personal size does not apply for some components

Environment

  • Platform version: 7.2.3
  • Add-on version: 0.2.0.BETA.5

Description

  • Set small size in Theme Settings
  • Try to set a different size for some components

A.R. Nothing happens

Components:

  • Button
  • PopupButtom
  • LinkButton

Colors extension point

Provide an extension point (e.g. file with variables) to apply custom preset generated with editor.

No space between tabs if there are hidden tabs

Add a TabSheet with hidden tabs:

<tabSheet>
    <tab id="tab11"
         caption="Tab Tab 1"
         margin="true"
         spacing="true">
    </tab>
    <tab id="tab12"
         caption="Tab Tab 2"
         margin="true"
         spacing="true">
    </tab>
    <tab id="tab13"
         caption="Tab Tab 3"
         margin="true"
         spacing="true"
         visible="false">
    </tab>
    <tab id="tab14"
         caption="Tab Tab 4"
         margin="true"
         spacing="true">
    </tab>
</tabSheet>

ER:
Screenshot 2020-11-19 at 16 33 54

AR:
Screenshot 2020-11-19 at 16 37 22

Required field '*' indicator

I have looked through the files in hope of finding how the red '*' is inserted after required field captions but cannot find more than this line in modules/web/themes/helium/helium-defaults.scss:

$v-show-required-indicators:true;

I am trying to implement this in my custom cuba theme. Any help on this would be highly appreciated.

Also, I hope this kind of issue is allowed, if not, I apologize.

DataGrid context menu displays disabled actions as regular

Define a DataGrid with a disabled action

<dataGrid id="usersTable"
          width="100%"
          dataContainer="usersDc">
    <actions>
        <action id="create" type="create"/>
        <action id="edit" type="edit"/>
        <action id="remove" type="remove" enable="false"/>
    </actions>
    <columns>
        ...
    </columns>
    <buttonsPanel id="buttonsPanel"
                  alwaysVisible="true">
        <button id="createBtn" action="usersTable.create"/>
        <button id="editBtn" action="usersTable.edit"/>
        <button id="removeBtn" action="usersTable.remove"/>
    </buttonsPanel>
</dataGrid>

AR:
A disabled action is displayed as regular.

Screenshot 2020-06-01 at 10 59 16

Make buttons independent of their related colors

Currently, button's main color depends on the corresponding basic color, e.g. --primary-color, --success-color, etc. As a result, the user can't easily alter button's styles without changing related basic color.

Add derived variables calculation for colors of secondary button

The colors for the secondary button should be calculated from the --secondary-color:

  --button-secondary-hover-color: #4F5C78;                 // (--secondary-color) (d10%)
  --button-secondary-active-color: #3B4459;                // (--secondary-color) (d20%)
  --button-secondary-disabled-color: #A0AAC0;              // (--secondary-color) (l30%)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.