Преглед изворни кода

Redesigned feedback window

master
Maxim Voloshin пре 9 година
родитељ
комит
7b4941bde9
5 измењених фајлова са 142 додато и 38 уклоњено
  1. 87
    36
      css/_feedback.scss
  2. 16
    1
      css/_mixins.scss
  3. 5
    0
      css/_variables.scss
  4. 2
    0
      lang/main.json
  5. 32
    1
      modules/UI/Feedback.js

+ 87
- 36
css/_feedback.scss Прегледај датотеку

1
-/**
2
- * The feedback window inner div css.
3
- */
4
-.feedback {
5
-    width: 450px;
6
-    display: block;
7
-    margin-left: auto;
8
-    margin-right: auto;
9
-    text-align: center;
10
-    font-size: 22px;
11
-}
1
+@-webkit-keyframes shake-rotate {
2
+    0% {
3
+        -webkit-transform:scale(1) rotate(0deg);
4
+        transform:scale(1) rotate(0deg)
5
+    }
12
 
6
 
13
-/**
14
- * Style of the thank you text inside the feedback window.
15
- */
16
-.feedbackTitle {
17
-    font-size: 22px;
18
-    color: #087dba;
7
+    50% {
8
+        -webkit-transform:scale(.8) rotate(-5deg);
9
+        transform:scale(.8) rotate(-5deg)
10
+    }
11
+
12
+    to {
13
+        -webkit-transform:scale(1) rotate(3deg);
14
+        transform:scale(1) rotate(3deg)
15
+    }
19
 }
16
 }
20
 
17
 
21
-/**
22
- * Stars div css.
23
- */
24
-#stars {
25
-    font-size: 30px;
18
+@keyframes shake-rotate {
19
+    0% {
20
+        -webkit-transform:scale(1) rotate(0deg);
21
+        transform:scale(1) rotate(0deg)
22
+    }
23
+
24
+    50% {
25
+        -webkit-transform:scale(.8) rotate(-5deg);
26
+        transform:scale(.8) rotate(-5deg)
27
+    }
28
+
29
+    to {
30
+        -webkit-transform:scale(1) rotate(3deg);
31
+        transform:scale(1) rotate(3deg)
32
+    }
26
 }
33
 }
27
 
34
 
28
-/**
29
- * Star css.
30
- */
31
-#stars>a {
32
-    padding-right: 4px;
35
+.shake-rotate {
36
+    -webkit-animation-duration: .4s;
37
+    animation-duration: .4s;
38
+    -webkit-animation-iteration-count: infinite;
39
+    animation-iteration-count: infinite;
40
+    -webkit-animation-name: shake-rotate;
41
+    animation-name: shake-rotate;
42
+    -webkit-animation-timing-function: ease-in-out;
43
+    animation-timing-function: ease-in-out
33
 }
44
 }
34
 
45
 
35
-/**
36
- * Mouse over a star.
37
- */
38
-.starHover {
39
-    color: #087dba;
46
+.text-center {
47
+    text-align: center;
40
 }
48
 }
41
 
49
 
42
-/**
43
- * Detailed feedback section text area style.
44
- */
45
 .feedbackDetails textarea {
50
 .feedbackDetails textarea {
46
     resize: vertical;
51
     resize: vertical;
47
     min-height: 100px;
52
     min-height: 100px;
48
-}
53
+}
54
+
55
+.feedback-rating {
56
+    line-height: 1.2;
57
+    padding: 20px 0;
58
+
59
+    h2 {
60
+        font-size: 24px;
61
+        line-height: 1.2;
62
+        padding: auto;
63
+        margin: auto;
64
+        border: none;
65
+    }
66
+
67
+    .star-label {
68
+        font-size: 16px;
69
+        color: $rateStarLabelColor;
70
+    }
71
+
72
+    .star-btn {
73
+        color: $rateStarDefault;
74
+        font-size: 36px;
75
+        position: relative;
76
+        cursor: pointer;
77
+        outline: none;
78
+        text-decoration: none;
79
+        @include transition(all .2s ease);
80
+
81
+        &.starHover,
82
+        &.active,
83
+        &:hover {
84
+            color: $rateStarActivity;
85
+            
86
+            .fa {
87
+                top: -6px;
88
+            }
89
+        };
90
+
91
+        &.rated:hover .fa {
92
+            top: 0;
93
+        }
94
+
95
+        .fa {
96
+            position: relative;
97
+        }
98
+    }
99
+}

+ 16
- 1
css/_mixins.scss Прегледај датотеку

34
   @keyframes #{$animationName} {
34
   @keyframes #{$animationName} {
35
     @content;
35
     @content;
36
   }
36
   }
37
-}
37
+}
38
+
39
+@mixin transform($func) {
40
+    -moz-transform: $func;
41
+    -ms-transform: $func;
42
+    -webkit-transform: $func;
43
+    -o-transform: $func;
44
+    transform: $func;
45
+}
46
+
47
+@mixin transition($transition...) {
48
+    -moz-transition:    $transition;
49
+    -o-transition:      $transition;
50
+    -webkit-transition: $transition;
51
+    transition:         $transition;
52
+}

+ 5
- 0
css/_variables.scss Прегледај датотеку

1
 /**
1
 /**
2
+<<<<<<< HEAD
2
  * Style variables
3
  * Style variables
3
  */
4
  */
4
 $baseFontFamily: 'open_sanslight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
5
 $baseFontFamily: 'open_sanslight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
34
  */
35
  */
35
 $toolbarZ: 900;
36
 $toolbarZ: 900;
36
 $overlayZ: 800;
37
 $overlayZ: 800;
38
+
39
+$rateStarDefault: #ccc;
40
+$rateStarActivity: #f6c342;
41
+$rateStarLabelColor: #333;

+ 2
- 0
lang/main.json Прегледај датотеку

250
         "displayNameRequired": "Please enter your display name",
250
         "displayNameRequired": "Please enter your display name",
251
         "extensionRequired": "Extension required:",
251
         "extensionRequired": "Extension required:",
252
         "firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!",
252
         "firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!",
253
+        "rateExperience": "Please rate your meeting experience.",
254
+        "feedbackHelp": "Your feedback will help us to improve our video experience.",
253
         "feedbackQuestion": "How was your call?",
255
         "feedbackQuestion": "How was your call?",
254
         "thankYou": "Thank you for using __appName__!",
256
         "thankYou": "Thank you for using __appName__!",
255
         "sorryFeedback": "We're sorry to hear that. Would you like to tell us more?",
257
         "sorryFeedback": "We're sorry to hear that. Would you like to tell us more?",

+ 32
- 1
modules/UI/Feedback.js Прегледај датотеку

49
     return message;
49
     return message;
50
 };
50
 };
51
 
51
 
52
+var createRateFeedbackHTML = function () {
53
+    var rate = APP.translation.translateString('dialog.rateExperience'),
54
+        help = APP.translation.translateString('dialog.feedbackHelp');
55
+
56
+    return `
57
+        <div class="feedback-rating text-center">
58
+            <h2>${ rate }</h2>
59
+            <p class="star-label">&nbsp;</p>
60
+            <div id="stars" class="feedback-stars">
61
+                <a class="star-btn">
62
+                    <i class="fa fa-star shake-rotate"></i>
63
+                </a>
64
+                <a class="star-btn">
65
+                    <i class="fa fa-star shake-rotate"></i>
66
+                </a>
67
+                <a class="star-btn">
68
+                    <i class="fa fa-star shake-rotate"></i>
69
+                </a>
70
+                <a class="star-btn">
71
+                    <i class="fa fa-star shake-rotate"></i>
72
+                </a>
73
+                <a class="star-btn">
74
+                    <i class="fa fa-star shake-rotate"></i>
75
+                </a>
76
+            </div>
77
+            <p>&nbsp;</p>
78
+            <p>${ help }</p>
79
+        </div>
80
+    `;
81
+};
82
+
52
 /**
83
 /**
53
  * The callback function corresponding to the openFeedbackWindow parameter.
84
  * The callback function corresponding to the openFeedbackWindow parameter.
54
  *
85
  *
192
         // Defines the different states of the feedback window.
223
         // Defines the different states of the feedback window.
193
         var states = {
224
         var states = {
194
             overall_feedback: {
225
             overall_feedback: {
195
-                html: constructOverallFeedbackHtml(),
226
+                html: createRateFeedbackHTML(),
196
                 persistent: false,
227
                 persistent: false,
197
                 buttons: {},
228
                 buttons: {},
198
                 closeText: '',
229
                 closeText: '',

Loading…
Откажи
Сачувај