-
Notifications
You must be signed in to change notification settings - Fork 21
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
WIP: Search information panel #427
Conversation
|
||
|
||
@DatabaseEntity('SearchInformation') | ||
export class SearchInformation extends Entity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extending from the Entity
class and using the annotations is important if you want to save instances to the database. If you don't need that, you can use a "normal" class or simple variables without this overhead.
@@ -8,6 +8,7 @@ | |||
<mat-option *ngFor="let res of results" [value]="''"> | |||
<app-child-block *ngIf="res.getType()==='Child'" [entity]="res" [ngClass]="{'result-inactive': !res.isActive()}"></app-child-block> | |||
<app-school-block *ngIf="res.getType()==='School'" [entity]="res"></app-school-block> | |||
<app-search-information *ngIf="res.getType()==='SearchInformation'" [entity]="res"></app-search-information> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the app-child-block
and app-school-block
components to build on the reusable presentation of these Entities. for displaying the search information text, which is only relevant within the SearchComponent, you could even just directly display it here, maybe using a html span
. A separate component like you did can also be nice, but I am not sure whether it's an overkill here.
It might be easier to implement if you keep the search-information separate from the results array and it's *ngFor, then you don't have to make sure it has the same format like entities with their getType(), etc.
e.g. <mat-option *ngIf="searchInformationText"><span class="search-information">{{searchInformationText}}</span></mat-option>
Closing this. I think the search-bar loading UX issues can be picked up in a fresh branch more easily, as this PR has been idle and conflicting changes to the code base are coming up in the master branch. |
see issue: #366
Visible/Frontend Changes
To test search fo k, then there should be a information "no results found"
This is an idea how to do it, the code might be ugly and needs to be updated. So give me your input.