Max 33274e5b9a
feat(webapp): user teaser popover (#8450)
* calculate distance between current user and queried user

* fix query for unset location

* use database to calculate distance

* rename distance to distance to me, 100% calculation done in DB

* distanceToMe tests

* lint fixes

* remove comments

* Show user teaser popover with badges, Desktop

* Refactor UserTeaser and add mobile popover support

* Avoid click propagation (WIP)

* Prevent event propagation

* Adjust alignment and font sizes

* More spacing for statistics

* Add distance, simplify user link

* Refactor location info into own component

* Add tests for UserTeaserPopup

* Refactor and test LocationInfo

* Query distanceToMe, rename distance to distanceToMe

* Update test

* Improve tests for UserTeaser, WIP

* Fix tests

* DistanceToMe on User instead of Location

* Revert "DistanceToMe on User instead of Location"

This reverts commit 96c9db00a44cd120e47bfe9534d3e066a194744c.

* Fix notifications

* Refactor UserTeaser and fix location info

* Fix group member crash

* Show 0 distance

* Fit in popover on small screens

* Allow access to profile on desktop

* Revert backend changes

* Load user teaser popover data only when needed

* Fix type mismatch

* Refactor for clarity and accessibility

* Litte refactorings and improvements

* Fix popover test

* Adapt and fix tests

* Fix tests and bugs

* Add placeholder

* cypress: adapt user teaser locator to changes

* Remove delays and scrolling

* Disable popovers in notification list and fix layout

* Remove flickering

* Make overlay catch all pointer events on touch devices

* Re-add attribute for E2E test

* Fix test, return to mouseover

* fix snapshot

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
Co-authored-by: mahula <lenzmath@posteo.de>
2025-05-05 23:54:13 +00:00

181 lines
2.9 KiB
SCSS

@import './imports/_tooltip.scss';
@import './imports/_toast.scss';
// Transition Easing
$easeOut: cubic-bezier(0.19, 1, 0.22, 1);
.disabled-content {
position: relative;
&::before {
@include border-radius($border-radius-x-large);
box-shadow: inset 0 0 0 5px $color-danger;
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
pointer-events: none;
}
}
.layout-enter-active {
transition: opacity 80ms ease-out;
transition-delay: 80ms;
}
.layout-leave-active {
transition: opacity 80ms ease-in;
}
.layout-enter,
.layout-leave-active {
opacity: 0;
}
// slide up ease
.slide-up-enter-active {
transition: all 500ms $easeOut;
transition-delay: 20ms;
opacity: 1;
transform: translate3d(0, 0, 0);
}
.slide-up-enter,
.slide-up-leave-active {
opacity: 0;
box-shadow: none;
transform: translate3d(0, 15px, 0);
}
.main-navigation {
background: #fff;
}
blockquote {
display: block;
padding: 15px 20px 15px 45px;
margin: 0 0 20px;
position: relative;
/*Font*/
font-size: $font-size-base;
line-height: 1.2;
color: $color-neutral-40;
font-family: $font-family-serif;
font-style: italic;
border-left: 3px dotted $color-neutral-70;
&::before {
content: '\201C';
/*Unicode for Left Double Quote*/
/*Font*/
font-size: $font-size-xxxx-large;
font-weight: bold;
color: $color-neutral-50;
/*Positioning*/
position: absolute;
left: 10px;
top: 5px;
}
p {
margin-top: 0;
}
}
.main-navigation {
box-shadow: $box-shadow-base;
position: fixed;
width: 100%;
z-index: $z-index-page-submenu;
a {
outline: none;
}
}
hr {
border: 0;
width: 100%;
color: $color-neutral-80;
background-color: $color-neutral-80;
height: 1px !important;
}
[class$='menu-trigger'] {
user-select: none;
}
[class$='menu-popover'] {
display: inline-block;
nav {
margin-left: -17px;
margin-right: -15px;
}
}
#overlay {
display: block;
opacity: 0;
width: 100%;
height: 100%;
top: 0;
left: 0;
position: fixed;
background: rgba(0, 0, 0, 0.15);
z-index: $z-index-overlay;
pointer-events: none;
transition: opacity 150ms ease-out;
transition-delay: 50ms;
.dropdown-open & {
opacity: 1;
transition-delay: 0;
transition: opacity 80ms ease-out;
@media(hover: none) {
pointer-events: all;
}
}
}
.base-card > .ds-section {
padding: 0;
margin: -$space-base;
.ds-container {
padding: $space-base;
}
}
[class$='menu-popover'] {
min-width: 130px;
button {
display: flex;
align-content: center;
align-items: center;
.base-icon {
padding-right: $space-xx-small;
}
}
}
.v-popover.open .trigger a {
color: $text-color-link-active;
}
.hyphenate-text {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
}
.dropdown-arrow {
font-size: $font-size-xx-small;
}