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

feat: minimal_mode for iframe embedding #138

Merged
merged 19 commits into from
May 16, 2024
Merged

feat: minimal_mode for iframe embedding #138

merged 19 commits into from
May 16, 2024

Conversation

crfmc
Copy link
Collaborator

@crfmc crfmc commented Apr 9, 2024

Minimal Mode version for the UI, to be integrated into other sites as iframes

@dominikglodzikhms
Copy link
Collaborator

Dominik to look at the docs

crfmc added 9 commits April 23, 2024 12:14
-feat: intersection observer for hiding legend
-style: styles for minimal mode buttons and spacing
-feat: reformat the linear view controls (add container)
-style: adjut spacing of controls
-style: center controls only in minimal mode
-chore: adjust opacity calculation for legend
-chore: update title for navigation buttons
@@ -747,3 +748,259 @@ a:hover {
opacity: 1;
background-color: #7aaded;
}

Copy link
Member

@sehilyi sehilyi May 15, 2024

Choose a reason for hiding this comment

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

I see now that, since the gene search menu is in the middle, it occasionally overlaps with tooltips when I hover on an SV in the genome view. Making tooltips visible.

Suggested change
.track-mouseover-menu {
z-index: 999;
}

Comment on lines +328 to +331
const observer = new IntersectionObserver(entry => {
// Set intersection ratio as opacity (round up to one decimal place)
legendElement.style.opacity = '' + Math.ceil(10 * entry[0].intersectionRatio) / 10;
}, options);
Copy link
Member

Choose a reason for hiding this comment

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

I was not aware of IntersectionObserver which seems useful!

Copy link
Member

@sehilyi sehilyi left a comment

Choose a reason for hiding this comment

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

Looks good to merge this to the main branch! Once we test this mode with additional features that we were discussing (e.g., tooltips and auto-adjustment of the size of genome view), we should update our documentation.

@crfmc crfmc marked this pull request as ready for review May 16, 2024 16:12
@crfmc crfmc merged commit d1c1969 into master May 16, 2024
14 checks passed
@crfmc crfmc deleted the crfmc/minimal_mode branch May 16, 2024 16:12
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.

3 participants