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

Feature/winter edition #238

Merged
merged 11 commits into from
Apr 18, 2018
Merged

Feature/winter edition #238

merged 11 commits into from
Apr 18, 2018

Conversation

jakublamprecht
Copy link
Contributor

Those changes add winter theme to AETs that is automatically triggered two weeks before Christmas and is turned off two weeks after.

Description

Changed mechanism of adding classes of status icons. Added directive that triggers winter theme, changes logo and makes snow fall. Also updated some markup which could be simplified with the new way of adding icon classes.

Motivation and Context

It gives AET reports appropriate look and feel during winter time which can possibly boost users mood :)

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the AET Contributor License Agreement.

@@ -26,6 +26,7 @@ require.config({
'angularAMD': '../assets/libs/angularAMD/angularAMD',
'lodash': '../assets/libs/lodash/dist/lodash',
'angular-bootstrap': '../assets/libs/angular-bootstrap/ui-bootstrap-tpls',
'snowfall': '../assets/libs/snowfall/snowfall.min',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe there's a better way to include this that I didn't think about?

</div>
<div ng-if="test.getStatus() == 'rebased'">
<i class="fas fa-cloud-upload-alt"></i>
<i class="fas {{theme.statusClasses[test.getStatus()]}}"></i>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those elements are required, so that when a case gets accepted/rejected the icon is redrawn - simply adding an element with {{theme.statusClasses[test.getStatus()]}} won't work, since the italic tags are replaced with svg tags by fontawesome.

}
}

function isInDateRange(today, eventDate, dayMargin) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking about renaming the function to contain word near instead of range.
Checking if date is in range would expect arguments such as: date and range.
We are doing it slightly different. ->Would it be easier to read after such change?

@@ -0,0 +1,61 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

the folder report/src/main/webapp/app/components is the old one and not realy in sync with John Papa guide about folders for code. let's move this directive to some folder with the functional-like name.

we can create new folder below .../app called themes.

@@ -28,7 +28,7 @@
<script defer src="assets/icons/fontawesome-all.js"></script>
</head>

<body aet-hide-popovers aet-keyboard-shortcuts aet-sidepanel ng-class="{ 'menu-expanded': sidebarExpanded }">
<body aet-hide-popovers aet-keyboard-shortcuts aet-sidepanel aet-winter-edition ng-class="{ 'menu-expanded': sidebarExpanded }">
Copy link
Contributor

Choose a reason for hiding this comment

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

is this CSS class needed? why? Maybe it should be only added in December ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discussed

@wiiitek wiiitek merged commit cc933bc into master Apr 18, 2018
@wiiitek wiiitek deleted the feature/winter_edition branch April 18, 2018 08:20
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.

3 participants