Skip to content

Commit

Permalink
UX: fixed top menu when backlink to the site exists (#222)
Browse files Browse the repository at this point in the history
In this PR we introduced backlink to the site #220

This PR introduces a fixed position menu on top. Without it, when there are a lot of errors, the user has to scroll to the top to see the back button.
  • Loading branch information
lis2 committed Feb 15, 2024
1 parent e8ac14c commit f4fb543
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# CHANGELOG

- 2024-02-15: 2.17.1

- UX: fixed top menu when backlink to the site exists

- 2024-02-15: 2.17.0

- FEATURE: backlink to site
Expand Down
5 changes: 5 additions & 0 deletions client-app/app/controllers/index.js
Expand Up @@ -39,6 +39,11 @@ export default class IndexController extends Controller {
return Preload.get("back_to_site_link_path");
}

@computed
get hasTopMenu() {
return this.backToSiteLinkText && this.backToSiteLinkPath;
}

get actionsInMenu() {
return (
/mobile/i.test(navigator.userAgent) && !/iPad/.test(navigator.userAgent)
Expand Down
12 changes: 12 additions & 0 deletions client-app/app/styles/app.css
Expand Up @@ -277,10 +277,22 @@ tbody tr {
bottom: 320px;
overflow: auto;
}
#top-panel.with-top-menu {
top: 35px;
}

#top-menu {
position: fixed;
z-index: 900;
left: 0;
top: 0;
width: 100%;
}

#back-to-site-panel {
padding: 10px;
background-color: #f1f1f1;
height: 15px;
}

.message-info {
Expand Down
14 changes: 9 additions & 5 deletions client-app/app/templates/index.hbs
@@ -1,8 +1,12 @@
<div id="top-panel">
<BackToSiteLink
@path={{this.backToSiteLinkPath}}
@text={{this.backToSiteLinkText}}
/>
{{#if this.hasTopMenu}}
<div id="top-menu">
<BackToSiteLink
@path={{this.backToSiteLinkPath}}
@text={{this.backToSiteLinkText}}
/>
</div>
{{/if}}
<div id="top-panel" class={{if this.hasTopMenu "with-top-menu"}}>
<div id="log-table">
{{#if this.model.moreBefore}}
<div {{on "click" this.showMoreBefore}} class="show-more">
Expand Down
2 changes: 1 addition & 1 deletion lib/logster/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Logster
VERSION = "2.17.0"
VERSION = "2.17.1"
end

0 comments on commit f4fb543

Please sign in to comment.