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

Resolved the bug The banner message is causing the search bar to be o… #20794

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
641b99f
chore(deps): bump google.golang.org/grpc from 1.64.0 to 1.64.1 in /sr…
dependabot[bot] Jul 24, 2024
8696cf0
Resolved the bug The banner message is causing the search bar to be o…
kunal-511 Jul 30, 2024
fac9934
Updated the search-result.component.ts file to dynamically update the…
kunal-511 Aug 1, 2024
1bc7e52
Check for the other case of baneers also
kunal-511 Aug 3, 2024
a605a5f
Replace inline style binding with topValue property in search-result.…
kunal-511 Aug 7, 2024
2b0f37a
Refactored search overlay component bindings.
kunal-511 Aug 17, 2024
e8875d2
Removed the listener and clean unused components
kunal-511 Aug 22, 2024
72d7e64
add Test Case for SBOM feature (#20797)
Aug 1, 2024
4179f6a
refactor: unify the mock file generation (#20765)
chlins Aug 5, 2024
4acf375
add list project arifacts API (#20803)
wy65701436 Aug 6, 2024
cd698c4
Fixes-20799 can't remove artifact labels (#20816)
xuelichao Aug 7, 2024
6dc9a00
Extend AWS ECR regex for c2s support (#20648)
ethanchowell Aug 8, 2024
f21f193
feat: implement bandwidth limit for proxy-cache (#20812)
Aug 8, 2024
05fbeb4
Parallel attach ldap group (#20705)
stonezdj Aug 9, 2024
ac036dc
remove migrate-patch (#20619)
kariya-mitsuru Aug 9, 2024
3a1e897
Check create when fire the artifact event (#20832)
stonezdj Aug 12, 2024
7406132
Fix #20658 docker-compose `version` is obsolete warning (#20659)
jhdxr Aug 12, 2024
21f9bcc
fix: fix the GC job index data race (#20830)
chlins Aug 12, 2024
98026a0
Fix typo in Swagger API docs (#20841)
johankok Aug 13, 2024
802ad6a
fix: update e2e test engine images (#20845)
Aug 14, 2024
0710e8f
enable audit log for robot (#20843)
wy65701436 Aug 14, 2024
2827912
add creator for robot (#20846)
wy65701436 Aug 15, 2024
7112044
Merge branch 'main' into bug-#20608
kunal-511 Aug 22, 2024
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
@@ -1,4 +1,4 @@
<div class="search-overlay" *ngIf="state">
<div [style.top.px]="getTopValue()" class="search-overlay" *ngIf="state">
<div id="placeholder1"></div>
<div class="search-header">
<a href="javascript:void(0)" (click)="close()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Component, OnInit, OnDestroy } from '@angular/core';
import {
Component,
OnInit,
OnDestroy,
Renderer2,
ElementRef,
HostListener,
} from '@angular/core';
import { Observable, Subscription } from 'rxjs';

import { GlobalSearchService } from './global-search.service';
Expand All @@ -21,6 +28,7 @@ import { SearchTriggerService } from './search-trigger.service';
import { AppConfigService } from '../../../services/app-config.service';
import { MessageHandlerService } from '../../services/message-handler.service';
import { filter, switchMap } from 'rxjs/operators';
import { BannerMessage } from 'src/app/base/left-side-nav/config/config';

@Component({
selector: 'search-result',
Expand Down Expand Up @@ -79,6 +87,7 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.onGoing = false;
this.originalCopy = searchResults; // Keep the original data
this.searchResults = this.clone(searchResults);
this.adjustOverlayTop();
},
error => {
this.onGoing = false;
Expand Down Expand Up @@ -133,6 +142,7 @@ export class SearchResultComponent implements OnInit, OnDestroy {
// Show the results
show(): void {
this.stateIndicator = true;
this.adjustOverlayTop();
}

// Close the result page
Expand Down Expand Up @@ -169,11 +179,27 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.onGoing = false;
this.originalCopy = searchResults; // Keep the original data
this.searchResults = this.clone(searchResults);
this.adjustOverlayTop();
},
error => {
this.onGoing = false;
this.msgHandler.handleError(error);
}
);
}
getTopValue(): number {
const headerHeight: number =
document.querySelector('navigator')?.clientHeight || 0;
const bannerHeight: number =
document.querySelector('app-app-level-alerts')?.clientHeight || 0;
return headerHeight + bannerHeight;
}

private adjustOverlayTop(): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

if you use this function to re-render the dom, then you can remove the style binding in [search-result.component.html](https://github.com/goharbor/harbor/pull/20794/files#diff-ec327ae356d30c4098c563bfce30fa1e746dfc33c449e9dcdd0a273c11297c7c)

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this function

const topValue = this.getTopValue();
}

onResize(event) {
this.adjustOverlayTop();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
z-index: 999;
box-sizing: border-box;
background: #fafafa;
top: 60px;
left: 0;
padding-left: 36px;
padding-right: 36px;
Expand Down