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

[Loader] Centralised, Double+Elastic, other modules supported and dimmer option added #301

Merged
merged 25 commits into from
Dec 20, 2018

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Dec 15, 2018

Description

This PR centralises the loader-element css code, adds new variations double and elastic of the loading animation and adds new loader options to dimmer

  • loader animation keyframes centralised
  • centralised color definition independent of the animation keyframes and shortened LESS code
  • support for colors & speed also in the loading variants of dropdown,search,tab,segment,button,input and form
  • new variant double which is basically the same as the usual loader, but has 2 colored parts of the circle
  • new variant elastic. You know this common animation from everywhere 😉 It's also supported
    everywhere* in combination of any color or speed.

*Only form and segment do not support elastic because the :before pseudo-tag is used for dimming and i wanted to keep the code as short and compatible as possible to the common loader

Examples

Variant double

double_loader

<div class="ui active large slow red double loader inline"></div>
<div class="ui active large slow brown double loader inline"></div>
<div class="ui active large slow violet double loader inline"></div>
<button class="ui inverted red slow double loading button">Loading</button>
<button class="ui primary slow loading double button">Loading</button>
<div class="ui left icon input blue slow double loading">
  <input type="text" placeholder="Search...">
  <i class="search icon"></i>
</div>
<div class="ui pink slow double loading dropdown">
  Dropdown <i class="dropdown icon"></i>
</div>

Variant elastic

elastic_loader

<div class="ui active large purple elastic loader inline"></div>
<div class="ui active primary slow large loader inline elastic"></div>
<div class="ui active large fast black elastic loader inline"></div>
<button class="ui inverted fast green elastic loading button">Loading</button>
<button class="ui teal slow loading elastic button">Loading</button>
<div class="ui left icon input secondary elastic loading">
    <input type="text" placeholder="Search...">
    <i class="search icon"></i>
</div>
<div class="ui pink slow elastic loading dropdown">
    Dropdown <i class="dropdown icon"></i>
</div>

Usage in Form

form_loader

<div class="ui teal slow double loading form"></div>

Usage in Dimmer

dimmer_loader

New Dimmer options

The dimmer has been enhanced to use the new features at runtime aswell. Three options were added

  • loaderText -> Text to display underneath the Loader
  • loaderVariation -> To add desired loader variation classes
  • displayLoader -> If a loader should be displayed on the dimmer
$('#mydiv').dimmer({
            loaderText: 'New dimmer loader option ...',
            loaderVariation: 'slow orange massive elastic',
            displayLoader:true
        }).dimmer('show');

Usage in segment

As you already can specify a color to a segment to color its top border, by default an added loading class to a segment will automatically be displayed in the same color.

<div class="ui red segment loading"></div>

red_segment
If you do not want this, then add usual to your loading definition and the loader inside the segment will be displayed as before

<div class="ui red segment usual loading"></div>

red_segment_usual_loading

… components (dropdown, search, tab, segment, button, input, form. Also fixed tab loading position
…with other 'variation' for the meaning of additional classes
@lubber-de lubber-de added type/feat Any feature requests or improvements lang/css Anything involving CSS lang/javascript Anything involving JavaScript tag/new-component New UI components state/awaiting-reviews Pull requests which are waiting for reviews labels Dec 15, 2018
@lubber-de lubber-de added this to the 2.7.x milestone Dec 15, 2018
@lubber-de lubber-de added the state/awaiting-docs Pull requests which need doc changes/additions label Dec 15, 2018
src/themes/default/modules/tab.variables Outdated Show resolved Hide resolved
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

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

LGTM

@y0hami
Copy link
Member

y0hami commented Dec 18, 2018

@lubber-de These conflicts will need fixed 😉

# Conflicts:
#	src/definitions/collections/form.less
#	src/definitions/elements/input.less
#	src/definitions/elements/loader.less
#	src/definitions/elements/segment.less
#	src/definitions/modules/search.less
#	src/definitions/modules/tab.less
@lubber-de
Copy link
Member Author

lubber-de commented Dec 18, 2018

@lubber-de These conflicts will need fixed

Solved the conflicts, it's mergeable into develop again

Copy link
Member

@ColinFrick ColinFrick left a comment

Choose a reason for hiding this comment

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

LGTM

@y0hami y0hami merged commit 9d5c4f1 into fomantic:develop Dec 20, 2018
@y0hami y0hami removed the state/awaiting-reviews Pull requests which are waiting for reviews label Dec 20, 2018
@lubber-de lubber-de modified the milestones: 2.7.x, 2.7.0 Dec 20, 2018
@lubber-de lubber-de deleted the enhanced_loader branch December 20, 2018 12:40
@lubber-de lubber-de added state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo and removed state/awaiting-docs Pull requests which need doc changes/additions labels Dec 21, 2018
This was referenced Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS lang/javascript Anything involving JavaScript state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo tag/new-component New UI components type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants