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

CSS and other bug fixes for 2.0 beta 1 #2535

Merged
merged 12 commits into from
Mar 13, 2021

Conversation

ishangupta-ds
Copy link
Member

Proposed changes

  • CSS bugs fixed
  • Minor bug fixes for UI

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes

Special notes for your reviewer:

Bug-fix PR

Signed-off-by: ishangupta-ds <[email protected]>
@@ -30,7 +30,7 @@ welcomeModal:

sidebar:
title: Litmus
version: 'Version: 1.13'
version: "Version: 1.13"

Copy link
Member

Choose a reason for hiding this comment

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

Please remove double/single quotes as it is not required. Only where we have to use : as part of the string we require to write it in quotes. Also kindly do remove such quotes which are not required at all places in the translation file

Copy link
Member Author

Choose a reason for hiding this comment

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

sure these changes took place automatically due to the editor configurations

Copy link
Member Author

Choose a reason for hiding this comment

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

will revert to the original file @whitetiger1399

Copy link
Member

Choose a reason for hiding this comment

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

Also, do the necessary changes at other places also. We can take it up as part of refactoring.

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR cannot include refactoring changes due to the deadlines of beta 1. Patch releases can be done @whitetiger1399 cc: @rajdas98

Copy link
Contributor

Choose a reason for hiding this comment

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

the yaml file doesn't require strings in "".
Please follow consistent typing. This shouldn't go as a separate patch. Don't fix what's not broken :)

Copy link
Contributor

Choose a reason for hiding this comment

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

remove quotes from yaml string. not needed

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes i have already mentioned that i am reverting to the original file @arkajyotiMukherjee PTAL

@@ -42,16 +42,16 @@ const useStyles = makeStyles((theme) => ({
margin: theme.spacing(1),
textAlign: 'center',
cursor: 'pointer',
border: `1px solid ${theme.palette.text.hint}`,
Copy link
Member

@whitetiger1399 whitetiger1399 Mar 12, 2021

Choose a reason for hiding this comment

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

Can we replace px with some other relative unit at this place and other places also

Copy link
Member Author

@ishangupta-ds ishangupta-ds Mar 12, 2021

Choose a reason for hiding this comment

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

yes @whitetiger1399 , I have just fixed the colours as these components are being removed as part of the v2 redesign so increasing the number of changes with this, won't be of much use here. We may refactor the code while redesigning which is already in progress on a separate branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

For border px is fine...you can change but it's fine...too small a thing... you won't notice it being responsive.

@@ -118,7 +118,7 @@ const YamlEditor: React.FC<YamlEditorProps> = ({
'ace_gutter-cell'
);
for (let i = 0; i < nodeStyleErrorList.length; i += 1) {
(nodeStyleErrorList[i] as any).style.backgroundColor = '#1C1C1C';
Copy link
Member

Choose a reason for hiding this comment

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

Kindly import colors from theme file if possible instead of hardcoded colors

Copy link
Member Author

Choose a reason for hiding this comment

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

These changes will be with v2 redesigning.

Copy link
Member

@whitetiger1399 whitetiger1399 Mar 12, 2021

Choose a reason for hiding this comment

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

If we are making any change in the Hex then it can be from litmus theme itself now also as hard coded colors do not look good.

Copy link
Member Author

Choose a reason for hiding this comment

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

There are two different colours in the editor right now, latest code is available on v2 branch

Copy link
Member Author

Choose a reason for hiding this comment

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

This change makes the colour uniform as was in the design before some breaking changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

use useTheme() to take the colors rom theme file

@@ -67,6 +78,12 @@ const useStyles = makeStyles((theme) => ({
},

arrowForwardIcon: {
color: theme.palette.primary.main,
marginLeft: theme.spacing(1),
Copy link
Member

Choose a reason for hiding this comment

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

Kindly avoid giving margin in negative numbers. Try to rearrange the div or its children position.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here its required @whitetiger1399 , it has been used at many places with negative margins.

Copy link
Member Author

Choose a reason for hiding this comment

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

The optimization may be done in patch releases or else again the changes would increase because of code refactoring.

Copy link
Member

Choose a reason for hiding this comment

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

Making this change won't increase the number of file change as it is already being changed. We can take it up as part of refactoring now and not delay it
cc: @arkajyotiMukherjee

Copy link
Contributor

Choose a reason for hiding this comment

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

Delaying it makes no sense... it'll be always put in a backlog... please make all required changes now...

Copy link
Contributor

Choose a reason for hiding this comment

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

Patch releases should be for unknown bugs after release...not for known problems in an unmerged PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Path releases are for fixing unknown bugs...let's not use it to push know fixes to an unmerged PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok for the above class i am updating, for all other places we might need another PR @arkajyotiMukherjee

Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine but then you need to take responsibility and track all the files with filenames where the changes need to be done. @ishangupta-ds

Copy link
Contributor

Choose a reason for hiding this comment

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

@whitetiger1399 any reasons for avoiding negative margins? I don't see any harm in using it.

@@ -105,19 +122,22 @@ const useStyles = makeStyles((theme) => ({
flexDirection: 'row',
marginTop: theme.spacing(3.75),
marginBottom: theme.spacing(2),
[theme.breakpoints.down('md')]: {
Copy link
Member

Choose a reason for hiding this comment

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

Kindly use standard and common breakpoints rather than a specific number

Copy link
Member Author

Choose a reason for hiding this comment

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

This again is required as the standard ones did not work correctly. @whitetiger1399

Copy link
Member

Choose a reason for hiding this comment

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

The standard ones should work. You may try with other standard breakpoints and set the most suitable one rather than coming up with a specific number that is not as per Litmus UI

Copy link
Member Author

Choose a reason for hiding this comment

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

They are not working due to the design

@@ -149,5 +149,10 @@ const useStyles = makeStyles((theme: Theme) => ({
buttomPad: {
paddingBottom: theme.spacing(3.75),
},
closeBtn: {
color: theme.palette.secondary.contrastText,
Copy link
Member

Choose a reason for hiding this comment

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

Kindly avoid negative values for margins and try rearranging the divs. cc : @arkajyotiMukherjee

Copy link
Member Author

Choose a reason for hiding this comment

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

@whitetiger1399 the litmus-ui modal is placing the button inside the content so this cannot be changed or the display is blocked by this button.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have updated at other places but here it's not working without negative margins because of the way the modal was built.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to raise the a PR to litmus-ui and avoid unwanted coding practices.
Can you track this change and make sure to remove it after updating litmus-ui @ishangupta-ds

@@ -281,7 +281,9 @@ const VerifyCommit: React.FC<VerifyCommitProps> = ({
onClose={handleClose}
width="60%"
modalActions={
<ButtonOutlined onClick={handleClose}>&#x2715;</ButtonOutlined>
Copy link
Member

Choose a reason for hiding this comment

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

Can we use icon from Litmus as per Figma rather than Unicode character being passed as children to button component? cc: @arkajyotiMukherjee

Copy link
Member Author

Choose a reason for hiding this comment

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

This is essentially a colour fix PR @whitetiger1399 cc: @arkajyotiMukherjee All modals are using such Unicode values, file changes will be 50+ if all changes are made in this PR itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe it'll cross that many files... unicode is fine if it looks exactly like the design

Copy link
Member Author

Choose a reason for hiding this comment

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

I have not updated any code just added a class file @whitetiger1399

@ishangupta-ds
Copy link
Member Author

@vanshBhatia-A4k9 Please pull the entire code to test instead of adding changes to certain parts, you are missing some changes in other files which is why the graph isn't resizing PTAL at the file changes.

@vanshBhatia-A4k9
Copy link
Member

@vanshBhatia-A4k9 Please pull the entire code to test instead of adding changes to certain parts, you are missing some changes in other files which is why the graph isn't resizing PTAL at the file changes.

Sure @ishangupta-ds I will do so, but the point was that there are no responsive designs with us, and adding responsiveness without them wouldn't be the correct approach.

@ishangupta-ds
Copy link
Member Author

ishangupta-ds commented Mar 12, 2021

@vanshBhatia-A4k9 Please pull the entire code to test instead of adding changes to certain parts, you are missing some changes in other files which is why the graph isn't resizing PTAL at the file changes.

Sure @ishangupta-ds I will do so, but the point was that there are no responsive designs with us, and adding responsiveness without them wouldn't be the correct approach.

Its not just a responsiveness fix, if you notice the current UI of the page even with a slightly reduced window size the graph and map leave the background paper which is not as per design. @vanshBhatia-A4k9

@vanshBhatia-A4k9
Copy link
Member

Screenshot from 2021-03-12 19-12-32

This is how it appears on my screen using the dev tools for the breakpoints

without devtools:
Screenshot from 2021-03-12 19-13-55

@vanshBhatia-A4k9
Copy link
Member

@vanshBhatia-A4k9 Please pull the entire code to test instead of adding changes to certain parts, you are missing some changes in other files which is why the graph isn't resizing PTAL at the file changes.

Sure @ishangupta-ds I will do so, but the point was that there are no responsive designs with us, and adding responsiveness without them wouldn't be the correct approach.

Its not just a responsiveness fix, if you notice the current UI of the page even with a slightly reduced window size the graph and map leave the background paper which is not as per design. @vanshBhatia-A4k9

Yes, you are correct, but as mentioned, reduced window sizes will mean making the designs more responsive, which it is presently not and we don''t have them in figma either AFAIK

@ishangupta-ds ishangupta-ds dismissed arkajyotiMukherjee’s stale review March 12, 2021 15:49

PTAL at latest changes, all comments are on outdated files.

Copy link
Contributor

@arkajyotiMukherjee arkajyotiMukherjee left a comment

Choose a reason for hiding this comment

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

Please create an issue to track the requested changes which can not be accommodated now...and assign yourself the same

@@ -382,4 +379,10 @@ export const StyledTableCell = withStyles((theme) =>
})
)(TableCell);

export const StyledCheckbox = withStyles((theme) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

then please make it a component and import form the component folder

@@ -29,34 +29,35 @@ const useStyles = makeStyles((theme) => ({
},
},
cityMapComposableMap: {
width: '54rem',
height: '40rem',
width: '45vw',
Copy link
Contributor

Choose a reason for hiding this comment

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

Make "Removing plotly and using litmus-ui graphs" an action item for the next release please.

@@ -149,5 +149,10 @@ const useStyles = makeStyles((theme: Theme) => ({
buttomPad: {
paddingBottom: theme.spacing(3.75),
},
closeBtn: {
color: theme.palette.secondary.contrastText,
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to raise the a PR to litmus-ui and avoid unwanted coding practices.
Can you track this change and make sure to remove it after updating litmus-ui @ishangupta-ds

@ishangupta-ds
Copy link
Member Author

The close button is at a good place for all other use cases but for the editor it interferes with the text area, I am trying an alternative fix. @arkajyotiMukherjee

Signed-off-by: ishangupta-ds <[email protected]>
@ishangupta-ds
Copy link
Member Author

suggested changes have been made @arkajyotiMukherjee PTAL.

@arkajyotiMukherjee
Copy link
Contributor

Let's still create an issue in litmus-ui and link in this PR thread...if not relevant we will close it @ishangupta-ds

@ishangupta-ds
Copy link
Member Author

Here is the issue @arkajyotiMukherjee litmuschaos/litmus-ui#28 (comment)

@ishangupta-ds
Copy link
Member Author

@Saranya-jena PTAL at the settings bug fixes.

Copy link
Member

@vanshBhatia-A4k9 vanshBhatia-A4k9 left a comment

Choose a reason for hiding this comment

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

Thank you for the changes 🙂

@ishangupta-ds
Copy link
Member Author

@rajdas98 we may merge this now before beta 1

@ishangupta-ds
Copy link
Member Author

/merge

@github-actions github-actions bot added the merge label Mar 12, 2021
Signed-off-by: ishangupta-ds <[email protected]>
@imrajdas imrajdas merged commit 22f1306 into litmuschaos:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants