Closed rahulchaudhary2244 closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
mockly | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 1, 2024 7:11pm |
Hi @rahulchaudhary2244 ,
I noticed that changing the screen size to a very large value, such as 140000
, breaks the image rendering and the state becomes irreversible. To address this, we should set maximum and minimum limits for both height and width in the custom screen size input to prevent such issues.
https://github.com/user-attachments/assets/c0dbd65f-7ed9-43c5-888f-3721b9ce79ff
Hi @suryanshsingh2001 , Thank you for your suggestion! I appreciate your input and will give it a try to resolve the issues. I'll keep you posted on how it goes.
@rahulchaudhary2244 Just a quick reminder to pull the latest changes from the master repository to ensure you’re all up to date and avoid any potential merge conflicts as you work on new updates.
Hi @suryanshsingh2001 ,Thank you for reviewing the changes! I have implemented the following updates:
Added submit functionality for both the Enter key and the onBlur event.
Increased the maximum resolution to 2K.
When a user clicks on a different input field, the onBlur event is triggered. This will either display an error state or update the screenSize if the input is valid.
Hey, everything good and working. Only issue left.
- [ ] Take the latest pull from
master
branch. Your branch in one commit behind right now.
Please resolve this.
Hi @suryanshsingh2001 , just rebased the branch., should be fine now
@rahulchaudhary2244 Hi, I wanted to take a moment to personally thank you for your valuable contributions. Your insights and solutions have truly shaped the way Mockly has progressed, and I’m incredibly grateful for your work.
If there are any other issues you’d like to explore or areas for further improvement, feel free to dive in. I’d love the opportunity to collaborate with you again in the future.
One more small request @rahulchaudhary2244 Please make sure to star this to increase the overall reach of this repository to more open source traffic.
Pull Request Template
Description
This PR adds a feature for passing custom screen sizes.
Related Issue
https://github.com/suryanshsingh2001/mockly/issues/4
Closes # (issue) https://github.com/suryanshsingh2001/mockly/issues/4
Changes Made
1.) Implemented separate state variables to manage the dimensions of "customScreenSize" and "presetScreenSize". This allows for better tracking and control over the values for each screen size type. 2.) Updated the "screenSize" state based on the currently active tab, either "custom" or "preset". This ensures that the displayed screen size reflects the user's selection accurately. 3.) Added "handleCustomSizeChange" function to validate input for "customScreenSize". The validation allows only positive numerical values, ensuring data integrity and preventing invalid entries.
Type of Change
Select the type of change made with this pull request:
Screenshots (if applicable)
https://github.com/user-attachments/assets/3c418488-1d7d-46c2-91ae-a8e62771812d
How Has This Been Tested?
Checklist
Check off the following items before submitting the pull request: