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

Feature/#176 tooltips #180

Merged
merged 8 commits into from
Jan 23, 2023
Merged

Feature/#176 tooltips #180

merged 8 commits into from
Jan 23, 2023

Conversation

nicolaskolbenschlag
Copy link
Contributor

No description provided.

Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
@cypress
Copy link

cypress bot commented Jan 19, 2023



Test summary

28 5 0 0


Run details

Project sosci-frontend
Status Failed
Commit 8e0e65c
Started Jan 23, 2023 3:10 PM
Ended Jan 23, 2023 3:13 PM
Duration 03:13 💡
OS Linux Ubuntu - 22.04
Browser Chrome 109

View run in Cypress Dashboard ➡️

Failures are unavailable for this run. For more information, see the Cypress Dashboard


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Collaborator

@PhlppKrmr PhlppKrmr left a comment

Choose a reason for hiding this comment

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

Very good job, only had some small comments :)

And very nice that you knew about sveltestrap tooltips!

<svg height="48" width="48" xmlns="http://www.w3.org/2000/svg"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also introduced a new icon for grounding 😆. Yours looks very good as well, guess we'll have to decide which one we'll take while merging.

@@ -29,12 +29,13 @@
"prettier": "2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"sass": "^1.56.2",
"svelte": "^3.52.0",
"svelte": "^3.55.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a question. Does sveltestrap require/prefer a newer version of svelte or why did you update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the feedback!
It automaticallly updated when installing sveltestrap

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we currently even have a mechanism like dependabot that regularly checks the version of our dependencies?

Copy link
Collaborator

Choose a reason for hiding this comment

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

None that I know of

offsetY -= baseOffset;
<div>
<button
id="btn-distribute"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Saw in sveltestrap that you can also use bind:this to specify the tooltip's target. Would imo look cleaner (especially when looking at the website in "Inspect" mode since there is no unnecessary id visible). Would this be too much of a change or can you adjust this?

Additionally, if you decide on keeping the id, does sveltestrap require button to be written as btn? Cause if it doesn't, I'd much prefer it to be written out to stay consistent with the rest of the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but then we need additional variables on which we bind the buttons that we would not need elsewise. I changed it anyways.

if ($channelActivated[index]) {
$offsetAdjustment[index] = offsetY;
offsetY -= baseOffset;
<div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

AFAIK you can actually remove the divs. Tried it out with the ground button and it still works as expected + the generated html looks cleaner (-> no "useless" div around the button since the Tooltip isn't rendered as an extra component anyway; that's what the aria-describedBy is for):
image

Copy link
Contributor Author

@nicolaskolbenschlag nicolaskolbenschlag Jan 22, 2023

Choose a reason for hiding this comment

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

You're right. Removed the divs.

<div>
<button
id="btn-gnd"
class="icon-button mui-icon--drop-down"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Already adapted in #171, so you can decide if you want to keep it like this till the merge. This is the ground/gnd button, not drop-down.

<Tooltip target="btn-onoff" placement="bottom"
>{TOOLTIP_BUTTON_OFFOFF_BASE}{$osciEnabled
? TOOLTIP_BUTTON_OFFOFF_OFF
: TOOLTIP_BUTTON_OFFOFF_ON}</Tooltip
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this correctly linted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not :)
I will check it.

Apps/frontend/src/labels.js Show resolved Hide resolved
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Copy link
Contributor

@jenswaechtler jenswaechtler left a comment

Choose a reason for hiding this comment

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

Please run the linter over it. At least two files (which you have not touched yourself) are changed for me. ChannelConfigControlPanel.svelte and ChannelConfigPopup.svelte
At least Reset and Distribute should be described even more precisely.

Comment on lines 36 to 38
{TOOLTIP_BUTTON_OFFOFF_BASE}{$osciEnabled
? TOOLTIP_BUTTON_OFFOFF_OFF
: TOOLTIP_BUTTON_OFFOFF_ON}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want three labels for this?
Wouldn't one be good enough? And even if we want to describe the state, two labels would be fine instead of putting the two states together from three labels.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it to two.

Apps/frontend/src/labels.js Show resolved Hide resolved
@@ -29,12 +29,13 @@
"prettier": "2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"sass": "^1.56.2",
"svelte": "^3.52.0",
"svelte": "^3.55.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we currently even have a mechanism like dependabot that regularly checks the version of our dependencies?

Comment on lines 12 to 13
export const TOOLTIP_BUTTON_DISTRIBUTE = "Distribute";
export const TOOLTIP_BUTTON_RESET = "Reset";
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a little more descriptive labels. Especially the ones that should contain a bit more information. What is distributed? What is reset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't reset self-explanatory, what text would you prefer elsewise?

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 think so. After all, it doesn't reset everything like the sliders, for example. Maybe you should write "Cleans the canvas and stops plotting"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, sounds good. I'll change the label text :)

jandegen and others added 3 commits January 22, 2023 18:57
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Copy link
Contributor

@jenswaechtler jenswaechtler left a comment

Choose a reason for hiding this comment

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

The cypress tests are not going through.

Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
Copy link
Collaborator

@PhlppKrmr PhlppKrmr left a comment

Choose a reason for hiding this comment

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

Changes look good, the only thing I don't quite like are the extensively long tooltips for distribute and reset. I would've simply written "Distribute vertically" (/"Distribute") and "Reset channels" (/"Reset"). But that's only my opinion :)
Edit: Saw that you just changed it, do you have an opinion what you'd prefer?

Moreover, I for some reason have a problem with white and dark mode on this branch, but I don't know where those stem from. Might actually be related to your problems in #171. We can/should look into it next sprint.

@rabbit-zero
Copy link
Collaborator

sosci-dark_mode

I checked out this branch and somehow it looks like this in dark mode

@nicolaskolbenschlag
Copy link
Contributor Author

Changes look good, the only thing I don't quite like are the extensively long tooltips for distribute and reset. I would've simply written "Distribute vertically" (/"Distribute") and "Reset channels" (/"Reset"). But that's only my opinion :) Edit: Saw that you just changed it, do you have an opinion what you'd prefer?

Moreover, I for some reason have a problem with white and dark mode on this branch, but I don't know where those stem from. Might actually be related to your problems in #171. We can/should look into it next sprint.

Thank you for the feedback.
I adapted the label texts according to Jens suggestion. Maybe we talk about it on wednesday and the POs might propose the final label texts. Chaning only the constant can be done later.
Regarding the dark-mode: I did not change anything related to the styling on this branch. I think this is related to the changes in dev.

@PhlppKrmr
Copy link
Collaborator

sosci-dark_mode

I checked out this branch and somehow it looks like this in dark mode

Same for me, we'll have to look into it next sprint.

@nicolaskolbenschlag
Copy link
Contributor Author

sosci-dark_mode

I checked out this branch and somehow it looks like this in dark mode

Okay, thank you for the feedback.
I think this is because dev was merged into this branch yesterday.

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.

5 participants