Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Conversation

ganeshkumar1989
Copy link
Contributor

@ganeshkumar1989 ganeshkumar1989 commented May 25, 2018

@AxelPeter
Copy link
Contributor

AxelPeter commented May 25, 2018

@ganeshkumar1989 Is there a staging (not in the ticket) ?

@ganeshkumar1989
Copy link
Contributor Author

ganeshkumar1989 commented May 28, 2018

I have added the staging link @AxelPeter . The link is also available in the ticket :)

Copy link
Contributor

@AxelPeter AxelPeter left a comment

Choose a reason for hiding this comment

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

.oui-progress style is outdated and need to be changed first because it'll impact the component design. Check the guidelines and specs, they have been updated last month :)


| Attribute | Type | Binding | One-time binding | Values | default | Description |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| type | String | @ | yes | `info`, `success`, `warning`, `error` | | Type of the progress component |
Copy link
Contributor

Choose a reason for hiding this comment

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

From the specs, this attribute should be only on children

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The parent and child are now combined to a single component

| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| type | String | @ | yes | `info`, `success`, `warning`, `error` | | Type of the progress component |
| max-value | Number | @? | yes | | 100 | The max value for the progress bar |
| indeterminate | Boolean | <? | yes | | false | Enable/Disable indeterminate mode. When in this mode, the progress component shows an indefinite wait and the max-value would not have any effect. In this mode, the progress component should not have any other component in it |
Copy link
Contributor

Choose a reason for hiding this comment

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

Guidelines has changed since, this is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been removed

| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| type | String | @? | yes | `info`, `success`, `warning`, `error` | parent's type | Type of the progress bar. If not provided, takes the type of the parent |
| value | Number | < | no | | | The current value for the progress bar |
| label-align | String | @? | yes | `left`, `right` | right | The alignment of the label inside the progress bar |
Copy link
Contributor

Choose a reason for hiding this comment

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

No need, the value is always right aligned (see UI specs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is removed :)

const widthPrecentage = (this.value * maxValuePercentage) / this.parent.maxValue;
this.$element.addClass("oui-progress__bar");
this.$element.addClass(`oui-progress__bar_${this.type}`);
this.$element.css("width", `${widthPrecentage}%`);
Copy link
Contributor

Choose a reason for hiding this comment

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

DOM manipulations need a $timeout wrap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done :)

const maxValuePercentage = 100;
const leftPrecentage = (this.value * maxValuePercentage) / this.parent.maxValue;
this.$element.addClass("oui-progress__threshold");
this.$element.css("left", `${leftPrecentage}%`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, $timeout :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done :)

@jleveugle
Copy link
Contributor

Hello @ganeshkumar1989,
Your pull request is now closed due to inactivity.
Feel free to re-open it if you have any update.
Anna Bot for OVH UX <3

@jleveugle jleveugle closed this Jun 29, 2018
@AxelPeter AxelPeter reopened this Jun 29, 2018
@AxelPeter AxelPeter force-pushed the feature/oui-progress branch from 881adfc to 0c54d09 Compare July 3, 2018 11:50
@ovh-ux ovh-ux deleted a comment from ovh-cds Jul 4, 2018
@AxelPeter AxelPeter force-pushed the feature/oui-progress branch 2 times, most recently from c6b0af6 to c721346 Compare July 4, 2018 08:53
@ovh-ux ovh-ux deleted a comment from ovh-cds Jul 4, 2018
@AxelPeter AxelPeter force-pushed the feature/oui-progress branch from c721346 to fd0f641 Compare July 4, 2018 08:55
@AxelPeter AxelPeter merged commit 41a0639 into develop Jul 4, 2018
@AxelPeter AxelPeter deleted the feature/oui-progress branch July 4, 2018 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

5 participants