Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
yesamer merged PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
ljmotta commented on code in PR #2845:
URL:
https://github.com/apache/incubator-kie-tools/pull/2845#discussion_r1922410927
##
packages/dmn-editor/src/overlaysPanel/OverlaysPanel.tsx:
##
@@ -43,17 +43,19 @@ export function OverlaysPanel({ availableHeight }:
OverlaysPanelProps) {
const overlayPanelContainer = useRef(null);
useLayoutEffect(() => {
if (overlayPanelContainer.current && availableHeight) {
- const bounds = overlayPanelContainer.current.getBoundingClientRect();
- const currentHeight = bounds.height;
- const yPos = bounds.y;
- if (currentHeight + yPos >= availableHeight) {
-overlayPanelContainer.current.style.height = availableHeight -
BOTTOM_MARGIN + "px";
-overlayPanelContainer.current.style.overflowY = "scroll";
+ if (!(overlayPanelContainer.current.scrollHeight > availableHeight)) {
+if (overlayPanelContainer.current.style.height !== "auto") {
+ overlayPanelContainer.current.style.overflowY = "hidden";
+ overlayPanelContainer.current.style.height = "auto";
+}
} else {
-overlayPanelContainer.current.style.overflowY = "visible";
+if (overlayPanelContainer.current.style.height !== availableHeight -
BOTTOM_MARGIN + "px") {
+ overlayPanelContainer.current.style.height = availableHeight -
BOTTOM_MARGIN + "px";
+ overlayPanelContainer.current.style.overflowY = "auto";
+}
Review Comment:
As we don't have any other condition inside the `if` and `else` we could put
all conditions in just one:
```
if (overlayPanelContainer.current.scrollHeight <= availableHeight &&
overlayPanelContainer.current.style.height !== "auto") {
...
} else if (overlayPanelContainer.current.style.height !== availableHeight -
BOTTOM_MARGIN + "px") {
...
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
Kusuma04-dev commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2602288136 > > @Kusuma04-dev Could you please add a video of the current solution? > https://github.com/user-attachments/assets/c8c8f93e-8355-4543-a5cb-9f14bf06cfb5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
ljmotta commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2595371029 @Kusuma04-dev Could you please add a video of the current solution? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
yesamer commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2594807803 > closed by #2845 Hey @Kusuma04-dev, you don't need this comment to link this PR with the ticket. You just need to write in the description `Closes ` or `Fixes ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
Kusuma04-dev commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2594755770 closed by https://github.com/apache/incubator-kie-tools/pull/2845 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
ljmotta commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2586948114 @Kusuma04-dev Which browser are you using? Maybe you can't reproduce because of that. Now, the behavior is different. https://github.com/user-attachments/assets/8fdaa9e7-683a-4fd1-ab63-570b0b05bb56 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
jomarko commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2586713279 @ljmotta should I use browser zoom feature or editor zoom feature? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
Kusuma04-dev commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2586229263 > @jomarko Please zoom out to see the issue. @Kusuma04-dev I still see the issue here in my machine. Please, remember that the overlay panel should be **_close_** to the bottom end of the editor. Hi @ljmotta , Can you please check it once and if it is still there we can connect once to see the issue as i am not seeing the issue on my machine now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] kie-issues#1679 : If the bottom of the overlay panel is close to editor bottom, it adds a vertical overflow after toggling an option [incubator-kie-tools]
ljmotta commented on PR #2845: URL: https://github.com/apache/incubator-kie-tools/pull/2845#issuecomment-2583664224 @jomarko Please zoom out to see the issue. @Kusuma04-dev I still see the issue here in my machine. Please, remember that the overlay panel should be **_close_** to the bottom end of the editor. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
