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

Remove the double scroll in the notification item #14781

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<i class="fa-regular fa-bell" aria-hidden="true" data-bs-toggle="tooltip" data-bs-original-title="@T["You have no unread notifications"]"></i>
}
</button>
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute" style="max-width: 20rem;">
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute">
@if (Model.Notifications.Count > 0)
{
var maxCount = Math.Min(Model.MaxVisibleNotifications, Model.Notifications.Count);
<li style="max-height: 30rem; overflow-y: auto;">
<li>
@for (int i = 0; i < maxCount; i++)
{
var notification = Model.Notifications[i];
Expand Down Expand Up @@ -61,7 +61,11 @@
</script>

<style at="Head">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we using these instead of having it in a SCSS file?

Copy link
Member Author

Choose a reason for hiding this comment

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

These were already inline. Not sure it's worth creating a new css file (which causes a additional http request)

Maybe we should just add it to TheAdmin.css and TheTheme.css. I don't recall if we have TheTheme.css already or not.

.notification-navbar .notification-is-unread {
font-weight: 600 !important;
.notification-navbar {
max-width: 20rem;
}

.notification-navbar .notification-is-unread {
font-weight: 600 !important;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<i class="fa-regular fa-bell" aria-hidden="true" data-bs-toggle="tooltip" data-bs-original-title="@T["You have no unread notifications"]"></i>
}
</button>
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute" style="max-width: 20rem;">
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute">
@if (Model.Notifications.Count > 0)
{
var maxCount = Math.Min(Model.MaxVisibleNotifications, Model.Notifications.Count);
<li style="max-height: 30rem; overflow-y: auto;">
<li>
@for (int i = 0; i < maxCount; i++)
{
var notification = Model.Notifications[i];
Expand Down Expand Up @@ -64,7 +64,17 @@
</script>

<style at="Head">
.notification-navbar .notification-is-unread {
font-weight: 600 !important;
.notification-navbar {
max-width: 20rem;
}

.notification-navbar .notification-is-unread {
font-weight: 600 !important;
}

.dropdown-menu.scrollable {
overflow-y: auto;
max-height: var(--oc-height-dropdown, 250px);
scrollbar-width: thin;
}
</style>