Positioning the Annotations pane so as much annotations about the selected data field are visible as possible
RS-518
RS-854
Problem
Dominic made a movie to illustrate the problem:
Currently the icon works as follows;
- If the icon is clicked and there are no annotations then it launches an annotation dialogue box
This situation should not occur. You should click the add annotation button to create an annotation. - If annotation already exisit then it displays the annotations.
- If you click the
button next to an item that has an annotation then the screen jumps to the top of the page where the annotation page is displayed. You then cannot see the data field if it is further down the screen. In other words the annotation pane is diviorced from the data fields.
- If you do the same thing but there are no annotations then the dialogue appears on the same screen but then jumps to the top once the annotation is saved.
This should not happen (also note 1 above)
Desired Behavior
Dominic: the functionality that associates a data field with its annotations was part of the discussions around these pages in confluence.
- UI Redesign (Sofia)#Data annotation with notes. Vlado: I don't see it there
- UI redesign of Nuxeo#Dominics annotations of the UI. Vlado: I see note "if to click on an annotation that the related field in the record will come into focus" and "Page scrolls to the record or annotations"
The annotations should roll with the selected field otherwise you will not be able to see the annotations associated with the field you selected and when you scroll up you can’t see the field you selected. This is fairly fundamental to the data annotation tool.
On Select Data Field
The annotation pane should be displayed juxtaposed with the selected data field.
The annotation pane should appear at the top of the screen but below the menus if they are on screen.
When a data field is selected further down the screen window so that the menus disappear, selecting a data field should make the annotation pane appear at the top of the screen so that the data field and the associated annotations are on the same screen - as below.
If the selected field has no annotations then if the user selects "add annotation" then the dialogue box appears on the same screen and when saved the annotation pane appears at the top of the screen not at the top of the window (under the menus) which are not visible.
Scrolling Up
When the screen is scrolled upwards the annotations pane should scroll to the top of the screen and then stick and stay at the top of the screen even if the data field selected disappears from sight.
Joiner
The UI design has a visible link between the field and the annotation pane.
This displays when the data field and the associated annotations are on the same screen but disappears when the data field is gone from view.
Go To Data Field
Suggestion: The annotation pane has an arrow which points downwards when the data field is further down the window. Or has a button saying "go to data field". See http://www.jqueryrain.com/2012/04/best-jquery-scroll-to-top-tutorial-plugin-with-example-demo/
This means that the user can get back quickly to the selected data field.
Scrolling Down
When scrolling down the user will need to see the bottom of the annotation pane so that all the annotations can be viewed even when the annotation pane is larger than the window. When the user reaches the bottom of the annotation pane there are two options.
- Option 1 – The annotation pane is not sticky and the user must scroll back up themselves. A visual indicator is connected between the annotation pane and the data field to indicate that the user is back to the original position.
- Option 2- The downward scroll works the same as upwards except that the user scrolls downward until s/he reachers the botton of the annotation pane at which point the annotation is sticky and the bottom of the pane always sits at the bottom of the screen. When the user scrolls up the annotation pane scrolls up until the top of the annotation pane is at the top of the screen at which point it becomes sticky.
Summary
- Annotation pane sticky at top for scrolling up and at bottom for scrolling down.
- Normal scroll until the top or bottom are reached.
- Indicator which allows the user to get to selected data field quickly (up and down indicators).
- Connection between data field and annotation pane when both on screen.
Considerations
Svetoslav: the selected field gets a CSS class data-wrap that causes the gray background around it
Vlado: The problem is clear, but the solution is not simple, because:
- The Data pane could be shorter than the Annotations pane (eg BM data is often short, but comments could be numerous)
- The data field is selected on click only, but:
- User can navigate to another data section (Production, Research, Exhibitions, etc)
- User can collapse a data subsection, which can hide the data field inside that collapsed subsection
- User can scroll the browser window
Sticky Annotation Pane
Typically the Annotation Pane is shorter than the Data Pane (but not always).
If the Annotation Pane scrolls normally with the window, this can easily cause lots of blank space below or above it.
In order to maximize the displayed annotations, the pane's top or bottom should stick to the top or bottom of the window.
Dominic did a JS mockup here: http://jsfiddle.net/dKDJz/4/
- You can experiment by editing directly on page
- May bear out you contention of a sticky annotation top and bottom as along as the graduation from top and bottom is nicely controlled.
- I have added extra items etc to see it when it runs off the page.
Vlado: nice job!
I did some testing based on 3 factors:
- is the Data (left) pane taller/smaller than Annotation (right) pane?
- is the Window taller/smaller than Annotation pane?
- are we scrolling up or down?
Here are the results (NOKn means "Not OK"):
- case1: taller, taller, down:
- NOK1: top of pane can get hidden
Some better calculation is needed to maximize use at top (while preserving header).
For RS, better to get the dimension dynamically instead of hard-coding it! - NOK2: bottom of pane overlaps footer
Calculation is needed to preserve the footer - NOK3: There's a position where pane jumps from top to bottom. In this situation the pane could stick to top all the time, which I think is better
- NOK1: top of pane can get hidden
- case2: taller, taller, up
- The behavior is the same as for case1
- case3: taller, smaller, down
- NOK4: There is a position where there is whitespace below the frame, yet top of the frame is not visible
- Also NOK2
- NOK4: There is a position where there is whitespace below the frame, yet top of the frame is not visible
- case4: taller, smaller, up
- NOK5: There is a position towards the top where the pane jumps from "sticky top" to NOK4
These tests require a small edit to remove Posts from the HTML (TODO Anna?)
- case5: smaller, taller, down
- case6: smaller, taller, up
- case7: smaller, smaller, down
- case8: smaller, smaller, up
Requirements
Below are the requirements agreed to date. As discussion progresses, we can add more.
Position Annotation Pane on Select Data Field
When a data field is selected, that field is obviously on screen.
To show as many Annotations as possible, position the Annotations pane at:
- the top of the browser window, or
- the top of the Annotations column
- whichever is GREATER (i.e. the Annotation pane cannot go above the Annotation column)
(Note: the "joiner" is currently missing)
Forbid Collapse of Selected Data Field
- When a data field is selected, disable the Collapse button (down-arrow) of all subsections where the field belongs.
There can be 0 (the field is not in a subsection), 1 (top-level subsection) or 2 (nested subsection). - When a different field is selected, enable the Collapse buttons of the old field
- On load, all Collapse buttons are active
Developer: first describe here how you'd do this, and provide estimate
11 Comments
comments.show.hideAug 13, 2012
dominic.oldman
Once the window has been scrolled passed the original top of the annotation column it should then appear (with a little bit of padding so make it look better) at the top of the browser window. I will check with Hollie that this is what was intended.
Aug 13, 2012
hollie.lubbock
The annotations pane should stay in place unless the user selects a field. The user may be reading down the annotations pane.
If a field is selected to display the annotations the panel should move to meet the field and as Dominic says be a the top of the browser window.
The panel then stays in place if the user scrolls down (incase they are reading the annotation).
If they scroll up we can either get the annotations panel to stick to the top of the browser window or leave it in place.
Aug 13, 2012
Vladimir Alexiev
The user expects that scrolling down then up (by the same amount) should be idempotent (leaves the screen in its original state).
If scroll up "stays in place" while scroll down "sticks to top", that would "destroy" the display (detach annotation from the data)
Aug 13, 2012
hollie.lubbock
3. if they select another section the pane refocuses until then it behaves as described above
4. you can't collapse a section if the annotation pane is selected on it? We could use an error message. Dominic what do you think?
Aug 13, 2012
Vladimir Alexiev
3. I think that if the user navigates to another section, the headline of that section should be Selected, is that what you mean by "Refocuses"? But if there are no annotations for it, that would open the New Annotation panel, so we're mixing navigation with action: nogood.
Aug 13, 2012
dominic.oldman
Yes, but isn't this because you have not followed the design. Why do have section titles have annotation selections next to them?
This is why the screens need to follow the design otherwise it doesnt make sense. It doesnt make sense for a user to select a heading to annotate it. You only want the annotation panel to change when you click on something that you can (or want) to annotate.
Aug 13, 2012
dominic.oldman
I don't think that this should interfere with the other navigation. Once someone selects another field then the annotation panel is then reset
Aug 13, 2012
dominic.oldman
Yes, this would be the expected behavior of such a feature.
Vlado. What are the issues with implementing this? It seems reasonably straight forward and I have seen many implementations of such a feature.
Aug 14, 2012
dominic.oldman
What happens when an annotation field is selected
The annotation column is position to start at the top of the browser window and a link between the selected field and the annotation pane is established - as in the design. Annotation wont go over the top menus though.
If you scroll above the data point then it is sticky. When you reach the point above the annotation point then it becomes sticky.
The link to the data field and the annotation pane is a separate task.
What happens when the window is scrolled downwards
The annotations pan scrolls downward so the at the user can see all the annotations. Scrolls normally. Not sticky.
What happens when the user scrolls upwards
If you have selected a data field then the annotation should stay on screen positioned at the top of the screen until another field has been selected. Sticky.
What happens when the user clicks another data field
The annotation pane works in the same way as the previously selected field
What happens if a new Section is selected
If the functionality is such that all the annotations for the section can be shown in the annotation field then the annotation pane acts in the same way as if the section was a data field. If not then the user is taken to the section but the annotation pane will not change until a new annotaion field is selected.
What happens if a collapsable / expandable subsection is selected
If the functionality is such that all the annotations for the sub- section can be shown in the annotation field then the annotation pane acts in the same way as if the section was a data field. Annotations for further subsections are also included. If not then the user is taken to the section but the annotation pane will not change until a new annotaion field is selected.
What happens if a section is expanded or collapsed?
This does affect the currently selected annotatioon field and annotation pane.
What happens if the user tries to collapse a section that hold the currently selected data field
The user cannot collapse it.
Display of annotations - if possible
All annotations are visible when the whole record is selected
All annotations for the sections are visible when the section is selected
All annotations for the sub-sections are visible when the sub-section is selected
Annotation of data labels
Currently the user can annotate both data fields and data labels (relationships to the object). This needs further review. For the time being it should not be changed.
UI
Aug 14, 2012
Vladimir Alexiev
As discussed today:
Within the confines of the Annotation column
This "joiner" is a separate task. It can only be drawn if the selected field is on screen, and the Annotation pane is visible to the right of it (if the field is on bottom, pane is short and positioned on top of window, this won't be the case !!!)
I strongly dislike the asymmetric treatment of "upward" and "downward". If we want to keep the top of the Annotation pane visible, doesn't the same hold about the bottom? I think we must play with some interactive mockup (Dominics' intern) or another site to see it in action: else it will be easy to make a blunder.
Unfortunately we can't filter by "section or subsection". APs are addressed by Museum object and Statement.
"Section/subsection" includes heterogeneous data that doesn't share Statement components.
It was decided to first do it on BM RForms Mockup and implement for BM forms. Then we'll do the same reduction on RKD forms.
Note: Annotation Migration shows to which APs the "Comments" coming from RKD data are attached. We should keep those APs (or attach the comments elsewhere)
Aug 27, 2012
Stanislav Kostadinov
Joiner will be visible only if it is between the top and bottom border of the annotations pane. Otherwise it is hidden (there is no algorithm for connection between clicked area and annotations pane).