Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Alignment Fix for deploymentDetails page #1218

Merged
merged 2 commits into from
Feb 20, 2019
Merged

Alignment Fix for deploymentDetails page #1218

merged 2 commits into from
Feb 20, 2019

Conversation

isaac-dasan
Copy link
Member

@isaac-dasan isaac-dasan commented Feb 15, 2019

Type of change?

  • Bug fix
  • New feature
  • Enhancement
  • Breaking change (breaks backward compatibility)

Description, Context, Motivation

The summary section in the deployment details page was misaligned and also it was using 'TimeRenderer' component which is used to style pcs-grid. In this PR I've taken out some methods/const from 'PcsGridConfig' to 'methods' file in utilities folder, so I can apply styling to 'TimeRenderer' separately and summary stat seperately.
...

Checklist:

  • All tests passed
  • The code follows the code style and conventions of this project
  • The change requires a change to the documentation
  • I have updated the documentation accordingly

This change is Reviewable

export const formatTime = (value) => {
if (value) {
const time = moment.utc(value).local();
return (time.unix() > 0) ? time.format(DEFAULT_TIME_FORMAT) : '' || Config.emptyFieldValue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Config.emptyFieldValue || ''

Should this not be the correct order?

Copy link
Member Author

@isaac-dasan isaac-dasan Feb 15, 2019

Choose a reason for hiding this comment

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

No, we have to view the previous expression holistically. I could add a pair of brackets to make it clear.

((time.unix() > 0) ? time.format(DEFAULT_TIME_FORMAT) : '') || Config.emptyFieldValue;

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, got, my bad.

@ppathan ppathan merged commit a3518d6 into master Feb 20, 2019
@ppathan ppathan deleted the isaac/depdet branch February 20, 2019 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants