-
Notifications
You must be signed in to change notification settings - Fork 74
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
Imviz: Move coordinates overlay to toolbar #557
Conversation
jdaviz/app.vue
Outdated
@@ -1,6 +1,6 @@ | |||
<template> | |||
<v-app id="web-app"> | |||
<v-app-bar color="primary" dark dense flat app absolute clipped-right> | |||
<v-app-bar color="primary" dark flat app absolute clipped-right> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariobuikhuizen - what would be the cleanest way to make this be conditional on whether a certain tool is in the bar? I only need it to not be dense if we are using g-coords-info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i think we want to do this based on whether we are using imviz or other apps - I have an idea for how to do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look in the gaussian_smooth plugin vue file I'm pretty sure there's an example of checking which config the app is in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes I see - but in this case what I need is the actual instance of the tool which I think we don't keep track of otherwise.
a0fa402
to
2241920
Compare
This is ready for review |
I am not sure if my approval means anything here. This should be reviewed by the people who bless UI/UX features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert in glue/vue wizardry, but I approve since the code looks good and the app behaves as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Some polish:
|
My only thought is that to condense it a bit, you could put the two shorter outputs (pixel and value) on the same row, with world coordinates beneath them. So two rows rather than three, which might avoid needing to make the whole toolbar taller. |
That might help! |
I've now updated this as follows:
Preview: |
I think cutting off provides a stronger hint that I need to resize the browser. Wrapping just confused me. So I am okay with this if you cannot set a min size. Setting min size can also be a problem because what if someone opens this up on a tiny phone (when/if this is deployed as web app or something)? |
@astrofrog , it is not padding enough when image is larger (e.g., 2k x 2k or 4k by 4k); i.e., "y" and "Value" still jump around. Can the padding not be dynamically set based on max dim of current active display? No more wrapping though! |
Speaking of jumping around, since we're adamant to display unit of the value, it is also distracting to have the unit jumping around, but I am not sure if there is a simple way to pad the values (maybe use scientific notation?). |
4670130
to
9ef0bb6
Compare
@pllim - I've rebased this following the merging of your parsing PR, and I think there should no longer be any jumping issues with the latest commits? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some final nitpicks, though we can defer to future PRs if you don't think they are blockers.
-
Looks like
x
andy
are zero-indexed. People used to DS9 would expect 1-indexed. Perhaps just a matter of documentation. -
When data does not have WCS, does it make sense to show "World"?
- When cursor is out of bounds, does it make sense to show anything?
- Does it make sense to show fractional pixel? For example, this one is when the cursor is at the edge of
x=4
(y
is centered at 18 already; both 0-indexed). I don't think we have sub-pixel resolution (and it is not something we said we would support). It is confusing to seex=3.6
when I know it isx=4
.
- The unit of "Value" still jumps a bit when value switches between
+
and-
but I think we can ignore this unless user complains down the line.
I think when the cursor is out of bounds we should show nothing. My gut is that the text appearing will draw attention in a good way. We will have to get some feedback from users to be sure. |
I'll defer that to POs to decide how to handle this and can probably be done in a follow-up PR?
No, fixed
Other tools usually show fractional pictures - probably a question for the POs?
Yes I'm not sure how to fix that beyond switching to a monospace font (:vomiting_face:) I think this should be good to go otherwise! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am okay with remaining items as follow-up issues. OSX failure is unrelated and would be solved by #580 .
This comment has been minimized.
This comment has been minimized.
@astrofrog can you pull down the most recent main branch and rebase? We merged a bunch of CI-related PRs since this was created. |
9730522
to
507d96c
Compare
@rosteen - done! |
This moves the coordinates and data value info to the main toolbar:
This is to try and make it look like the proposed UI design - note that I had to widen the toolbar to accommodate this.
I also had to add a dictionary containing loaded tools on the application handler, which I'm not super happy about, but not sure if there is a more elegant solution (this is to allow viewers to have access to the tool instances)
EDIT: Close #545 , fix #514