-
Notifications
You must be signed in to change notification settings - Fork 32
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
Use a proper tooltip for the Metadata Quality widget #952
Conversation
@jahow let tell me if u have any comments |
Hi, thanks for this contribution. Could you please make sure that the CI is green first? thanks |
6711ba8
to
f554938
Compare
@jahow i had seen one error then i had fixed it, now it should be fine. if u see another one just tell me |
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.
Thanks @gkeimeHDF for creating a new Popover component with tippy.js!
This will make the UX much nicer :)
I added some comments. I think the export is the crucial thing to be added (and maybe the padding). Otherwise it looks good to me.
We could also re-use this new component for the favorite star component instead of tippy. But I'm not sure if this should be part of this PR.
|
||
@NgModule({ | ||
declarations: [ | ||
ColorScaleComponent, | ||
ProgressBarComponent, | ||
PopoverComponent, |
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.
The PopoverComponent
is missing in the exports Array otherwise it cannot be used by the metadata-quality component.
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.
export added
</div> | ||
<ng-template #popoverItems> | ||
<div class="mb-4 font-bold" translate>record.metadata.quality.details</div> |
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.
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 will look to add a padding.
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.
padding added
export class PopoverComponent implements AfterViewInit, OnChanges, OnDestroy { | ||
@ViewChild('popoverContent', { static: false }) popoverContent: ElementRef | ||
@Input() content: string | TemplateRef<any> | ||
@Input() theme: 'light' | 'light-border' | 'translucent' | 'material' | '' |
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.
Somehow the theming doesn't seem to get applied. Not in the storybook nor in the datahub. Is there something I'm missing?
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.
my screenshoot come from the story-book using light-border. Your screenshoot looks like the default theming same as ''. I don't know yet why it doesn't apply on your side. Which browser do you use?
I had added only light-border on datahub and the differents on storybook.
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.
Now the theming works on my side as well. Not sure what was the issue. Never mind! Looks good to me.
The PR looks good to me, I'm just hesitant to approve because of the failing pipeline. The e2e are a bit flaky and sometimes pass after rerunning them. |
That's right, PRs coming from forks will have failures on some workflows (this is a known problem). As long as the E2E failures do not seem related to the PR it's fine to approve. |
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.
Hey, thanks! I noticed the new UI component was not standalone, could you lease mak it so? thanks in advance
@Component({ | ||
selector: 'gn-ui-popover', | ||
templateUrl: './popover.component.html', | ||
styleUrls: ['./popover.component.css'], |
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.
Could you please make this component standalone? this is what we do for every new component now
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.
what is standalone component, and what does it apply ? i had based my code on ProgressBarComponent which is not standalone
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.
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.
@jahow I have done it yersterday, and i fixed the lint error this morning should be ok now
@gkeimeHDF Thanks for making the component standalone! In order to be able to use it in the metadata-quality component you need to import the |
@Angi-Kinas are you sure i need import in ui-elements? if it's standalone it should not be imported there no?. For sample PopupAlert is not imported in ui-widget. PS: And i had supposed u speak about libs/ui/widgets/src/lib/ui-widgets.module.ts. Maybe u really need speak about libs/ui/elements/src/lib/ui-elements.module.ts so are you sure i need import the component there if yes i can add but i don't see why i need to do this. |
Usually with standalone components you can easily import the component inside another component that uses it. E.g. the |
@Angi-Kinas Yes perfectly clear, i had changed the import. |
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.
Perfect! The code looks good to me now :)
The e2e tests are still failing and one is related to the metadata-quality component.
I ran that particular e2e test locally and it passes.
@jahow can we still merge it?
failures look unrelated :) @Angi-Kinas feel free to approve and merge, thanks! |
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.
Thanks again to @gkeimeHDF for this feature!
I'll approve and merge.
Description
This PR introduces a new Popover component
Architectural changes
The following library now depends on #819
Screenshots
Quality Assurance Checklist
breaking change
labelbackport <release branch>
labelThis work is sponsored by MEL