Skip to content

Conversation

@AlexJanson
Copy link
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

When viewing a layout, the user has the option to hover over a plot and get multiple options. Here, they can click on the info icon to get a panel with information about the object.

The problem lies of the fact that if the object is positioned on the left side of the screen, it will not be visible properly.

Now when we are on the left side of the window it will render the dropdown to the right of the button anchor.

const { name, id } = tabObject;
const { filterModel, router, object, services } = model;
const isSelectedOpen = object.selectedOpen;
const isSelectedOpen = object.selectedOpenName === id;
Copy link
Member

Choose a reason for hiding this comment

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

Doing this, it means that the selection will stay open only for one object which is not what we desired.

The functionality was requested and implemented in such a way that the users can quickly hover over the objects in sequence with the pop-up staying open so that they can compare the metadata.

Comment on lines 49 to 60
{
style: 'right:0.1em; width: 35em;left: auto;',
onupdate: (vnode) => {
if (object.isOnLeftSide(vnode.dom.parentElement)) {
vnode.dom.style.left = '0.1em';
vnode.dom.style.right = 'auto';
} else {
vnode.dom.style.right = '0.1em';
vnode.dom.style.left = 'auto';
}
},
},
Copy link
Member

Choose a reason for hiding this comment

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

Would it not be better to calculate the style position above and use it here directly rather than setting a position on L50, just to modify after?

* @returns {boolean|undefined} Returns true if the element is on the left half of the window,
* false if it is on the right half, or undefined if no element is provided.
*/
isOnLeftSide(element) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be better in a util folder so that other components can use it if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants