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

Fix: vertical bar broken in chart/gear acitivity (issue: #1646) #1673

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

AdityaKrSingh26
Copy link

@AdityaKrSingh26 AdityaKrSingh26 commented Nov 21, 2024

Fixed the broken vertical line in Chart/Gears activities, ensuring its applicable on all plaforms (issue: #1646)

Steps:

  • Divided the toolbar in two parts left and right, used dislay: flex and justify-content: space-between to move both the part to ends of both side of screen. and used dislay: flex and align-item:centre to move hr to correct position.
  • Earlier the negative margin was causing the cross platform issue for hr. Removed the negative margin.

Chrome:

image
image

Firefox:

image
image

Electron.js app:

image
image

Copy link
Owner

@llaske llaske left a comment

Choose a reason for hiding this comment

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

I guess it's related to your IDE settings but do not change file indentation.
Only lines updated should be in the PR.

Comment on lines 24 to 35
<div id="toolbar-left">
<sugar-toolitem ref="activityPal" id="activity-button"></sugar-toolitem>
<sugar-toolitem
ref="sharedPal"
id="network-button"
:title="l10n.stringNetwork"
palette-file="sugar-web/graphics/presencepalette"
palette-class="PresencePalette"
palette-event="shared"
@shared="SugarPresence.onShared"
v-if="SugarPresence"
></sugar-toolitem>
Copy link
Owner

Choose a reason for hiding this comment

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

Do not change indentation.

Comment on lines 37 to 39
<hr />
<sugar-toolitem id="add-button" :title="l10n.stringAddValue" @click="addData"></sugar-toolitem>
<sugar-toolitem id="remove-button" :title="l10n.stringRemoveValue" @click="removeData"></sugar-toolitem>
Copy link
Owner

Choose a reason for hiding this comment

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

Do not change indentation.

/* Toolbar separator */
.toolbar hr {
display: inline-block;
height: 33px;
margin: 2.5px;
margin-bottom: -17px;
/* margin-bottom: -17px; */
Copy link
Owner

Choose a reason for hiding this comment

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

Do not let commented code.

@AdityaKrSingh26
Copy link
Author

Ok i will make the changes you mentioned. Thanks

@AdityaKrSingh26
Copy link
Author

Hey @llaske i have removed the comments and indentation in my latest commit please have a look

@llaske
Copy link
Owner

llaske commented Nov 23, 2024

It works.
You're not supposed to change the library sugar-96dpi.css because it's a shared library copied in every activity.
BTW it could be acceptable if it's a minor change. But using flex in the toolbar a major change that will impact all activities. Plus split it in left/right has no logical reason.
Could you find a way to limit the impact to activity css only or to the hr element only?

@AdityaKrSingh26
Copy link
Author

I looked around a bit and found out that the issue with <hr/ > lines not being consistent was margin-bottom : -17px the negative margin is causing cross platform issue as different browser interpret negative margin differently (please correct me if i am wrong). Whiledisplay : flexproperty is consistent on all platforms.

I split right/left because on applying display flex the style class of pull-right was over written so to move the icons in group in 2 sides of screen i used justify-content : space-between

@AdityaKrSingh26
Copy link
Author

AdityaKrSingh26 commented Nov 24, 2024

One thing that i can think of is that wrapping <hr/> tag with a <div> tag and apply flex property on parent <div> of <hr/>
Is this fine ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants