-
Notifications
You must be signed in to change notification settings - Fork 105
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
EPMRPP-78035 || Launch and Test item description validation update #3188
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3188 +/- ##
===========================================
- Coverage 59.70% 59.67% -0.03%
===========================================
Files 75 75
Lines 804 806 +2
Branches 118 118
===========================================
+ Hits 480 481 +1
- Misses 296 297 +1
Partials 28 28
Help us with your feedback. Take ten seconds to tell us how you rate us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solution doesn't work
error is not appear after entering more than 2048 symbols
info hint not appears after entering 1000 symbols(comment to the task)
descriptionHint: { | ||
id: 'EditItemModal.descriptionHint', | ||
defaultMessage: "Description should have size from '0' to '2048' symbols", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the task there is should be a hint for each level like(launch, suite, test, step)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we use the same modal for launch, suite and so on, I've asked to use one message for all levels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I know we have selector to detect level
Also in case of any changes of the task you should ask to update it to avoid misunderstanding between owner and reviewers, qa team
@@ -269,3 +272,23 @@ | |||
} | |||
} | |||
} | |||
|
|||
@mixin additional-text($color) { | |||
position: relative; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the reason using position here? Why not margin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it doesn't work in another case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -23,6 +23,9 @@ | |||
&.focused { | |||
border-color: $COLOR--topaz; | |||
} | |||
&.invalid { | |||
border-color: $COLOR--orange-red; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't match design
active: PropTypes.bool, | ||
touched: PropTypes.bool, | ||
error: PropTypes.string, | ||
hint: PropTypes.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add hint
here? Yoг don't provide this props anywhere. But task have comment about it check it
} | ||
|
||
.error { | ||
@include additional-text($COLOR--red-failed-2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't match design
but maybe border color and error color should have the same color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think so too
&.color-orange { | ||
color: $COLOR--black-1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing. color orange but actually black
@@ -182,6 +184,7 @@ export class ModalLayout extends Component { | |||
const { | |||
title, | |||
warningMessage, | |||
warningColor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better provide warning type or appearance and rely on it f.e we have warningType = info, so he is responsible for making the icon orange and the text black
&.color-orange { | ||
color: $COLOR--black-1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This confuses. color orange but actually black
Maybe better provide warning type or appearance and rely on it f.e we have warningType = warn, so he is responsible for making the icon orange and the text black
error make them both red
and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree, I've though about it too, but in this case we have to update all used footers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its Ok to update all warning appearance as they are rendered by same modal layout.
@@ -515,6 +515,7 @@ | |||
"EditItemModal.attributesLabel": "Атрыбуты", | |||
"EditItemModal.contentTitle": "Апісанне {type}а", | |||
"EditItemModal.descriptionPlaceholder": "Увядзіце апісанне {type}а", | |||
"EditItemModal.descriptionHint": "Апісанне павінна мець памер ад '0' да '2048' сімвалаў", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same quotes everywhere.
&.color-orange { | ||
color: $COLOR--black-1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its Ok to update all warning appearance as they are rendered by same modal layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that error is appear?
this.simpleMDE && | ||
condition(this.simpleMDE.value()) && <div className={cx('hint')}>{text}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see MarkdownEditor has value
props maybe we can use it instead of
this.simpleMDE && condition(this.simpleMDE.value())
Also as MarkdownEditor is kind of common component if I want provide hint somewhere else I should always provide condition function even if I don't needed it(bcs without it it's leads to error) so maybe default hint should looks like
hint: { hintText: '', hintConditionFn: () => true }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw the error.
value
doesn't work. I've tried it first.
@@ -138,10 +138,10 @@ export class ModalFooter extends Component { | |||
)} | |||
{warningMessage && ( | |||
<div className={cx('warning-block')}> | |||
<i className={cx('warning-icon', { [`color-${warningColor}`]: warningColor })}> | |||
<i className={cx('warning-icon', { [warningType]: warningType })}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe type-${warningType}
and &.warning-type-info in scss to have more vision in the scss
@@ -85,7 +85,7 @@ export class ModalLayout extends Component { | |||
title: '', | |||
children: null, | |||
warningMessage: '', | |||
warningColor: '', | |||
warningType: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any default state?
@@ -105,6 +105,10 @@ const messages = defineMessages({ | |||
id: 'TestItemDetailsModal.parametersLabel', | |||
defaultMessage: 'Parameters:', | |||
}, | |||
descriptionHint: { | |||
id: 'EditItemModal.descriptionAdviceHint', | |||
defaultMessage: 'You used 1000 of 2048 symbols', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is static text, so the user can enter 2048 characters but still see that text, maybe the idea was to dynamically count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ask UX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX said that thought about static text, but if possible we can improve it to dynamic
No description provided.