-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat(Tooltip): can use 'parent' as the activator when inside a container #2297
Conversation
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.
Copilot reviewed 14 out of 26 changed files in this pull request and generated no comments.
Files not reviewed (12)
- docs/Masa.Blazor.Docs/wwwroot/data/apis/tooltips/MTooltip-en-US.json: Language not supported
- docs/Masa.Blazor.Docs/wwwroot/data/apis/tooltips/MTooltip-zh-CN.json: Language not supported
- docs/Masa.Blazor.Docs/Examples/components/tooltips/Activator.razor: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/proxies/echarts-proxy.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/masa-blazor.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/activatable/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/components/scroll-to-target/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/chunks/helper.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/intersect/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/resize/index.js: Evaluated as low risk
- src/Masa.Blazor.JS/src/interop.ts: Evaluated as low risk
- src/Masa.Blazor.JS/src/mixins/activatable.ts: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/Masa.Blazor.JS/src/utils/helper.ts:225
- Ensure parentElement.parentElement is not null before returning it to avoid potential errors.
if (parentElement.classList.contains('m-btn__content')) {
src/Masa.Blazor.JS/src/utils/helper.ts:216
- Ensure the selector is not empty or null before querying the DOM to prevent unnecessary errors.
export function getActivator(selector: string): HTMLElement | null {
src/Masa.Blazor/Mixins/Activatable/MActivatableBase.cs:53
- Ensure that the new behavior introduced by the ActivatorSelector property is covered by tests.
public string ActivatorSelector => Activator == "parent" ? "$parent.{Ref.GetSelector()}" : (Activator ?? "[{ActivatorId}]");
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.
Copilot reviewed 14 out of 26 changed files in this pull request and generated no comments.
Files not reviewed (12)
- docs/Masa.Blazor.Docs/wwwroot/data/apis/tooltips/MTooltip-en-US.json: Language not supported
- docs/Masa.Blazor.Docs/wwwroot/data/apis/tooltips/MTooltip-zh-CN.json: Language not supported
- docs/Masa.Blazor.Docs/Examples/components/tooltips/Activator.razor: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/components/scroll-to-target/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/activatable/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/resize/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/mixins/intersect/index.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/masa-blazor.js: Evaluated as low risk
- src/Masa.Blazor/Mixins/Activatable/MActivatableBase.cs: Evaluated as low risk
- src/Masa.Blazor/Mixins/Menuable/MMenuable.cs: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/chunks/helper.js: Evaluated as low risk
- src/Masa.Blazor/wwwroot/js/proxies/echarts-proxy.js: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/Masa.Blazor.JS/src/utils/helper.ts:1
- [nitpick] The constant 'activator_parent_prefix' should be renamed to 'ACTIVATOR_PARENT_PREFIX' to follow naming conventions for constants.
const activator_parent_prefix = "$parent.";
src/Masa.Blazor.JS/src/utils/helper.ts:218
- Ensure that the new function 'getActivator' is covered by tests to verify its behavior, especially the handling of the 'parent' prefix.
export function getActivator(selector: string): HTMLElement | null {
src/Masa.Blazor.JS/src/interop.ts:1056
- The measure function should handle cases where the activator is null. Add a check to ensure that the activator is not null before calling the measure function.
dimensions.activator = measure(activator, isDefaultAttach)
Resolves #2290