Skip to content

Conversation

@ebfood
Copy link
Contributor

@ebfood ebfood commented Jul 7, 2023

When optimizing the position of the context menu component #8 , I mainly made the following changes

  1. Obtained the actual width and height of the menu container and stored them in corresponding state variables.
  2. Adjusted the position of the menu based on its size and the viewport dimensions to ensure that it renders correctly within the boundaries.

With these optimizations, the menu's position is adjusted based on its actual width and height, ensuring that it renders within the boundaries and does not exceed them.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@invisal invisal left a comment

Choose a reason for hiding this comment

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

Amazing work. Thanks for contributing.

@invisal invisal merged commit e029a98 into querymx:main Jul 7, 2023
@invisal invisal linked an issue Jul 7, 2023 that may be closed by this pull request
@ebfood ebfood deleted the optimize-context-menu branch July 7, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context menu got clipped at the right edge of the windows

2 participants