Articles on ganimtron_10's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on ganimtron_10's BlogenFri, 25 Aug 2023 17:22:22 +0000Google Summer of Code Final Work Producthttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/google-summer-of-code-final-work-product-4/<p><a href="https://summerofcode.withgoogle.com/programs/2023/projects/BqfBWfwS"><img alt="gsoc" height="50" src="https://developers.google.com/open-source/gsoc/resources/downloads/GSoC-logo-horizontal.svg"></a> <a href="https://summerofcode.withgoogle.com/programs/2023/organizations/python-software-foundation"><img alt="" height="45" src="https://www.python.org/static/community_logos/python-logo.png"></a> <a href="https://fury.gl/latest/index.html"><img alt="fury" height="45" src="https://python-gsoc.org/logos/FURY.png"></a></p> <h1>Google Summer of Code Final Work Product</h1> <ul> <li><strong>Name:</strong> Praneeth Shetty</li> <li><strong>Organisation:</strong> Python Software Foundation</li> <li><strong>Sub-Organisation:</strong> FURY  </li> <li><strong>Project:</strong> <a href="https://github.com/fury-gl/fury/wiki/Google-Summer-of-Code-2023-(GSOC2023)#project-5-update-user-interface-widget--explore-new-ui-framework">FURY - Update user interface widget + Explore new UI Framework</a></li> </ul> <h2>Proposed Objectives</h2> <ul> <li>SpinBoxUI</li> <li>Scrollbar as Independent Element</li> <li>FileDialog</li> <li>TreeUI</li> <li>AccordionUI</li> <li>ColorPickerUI</li> </ul> <p>Stretch Goals:   </p> <ul> <li>Exploring new UI Framework</li> <li>Implementing Borders for UI elements</li> </ul> <h2>Objectives Completed</h2> <h3>SpinBoxUI:</h3> <p>The SpinBoxUI element is essential for user interfaces as it allows users to pick a numeric value from a set range. While we had an active pull request (PR) to add this element, updates in the main code caused conflicts and required further changes for added features. At one point, we noticed that text alignment wasn't centered properly within the box due to a flaw. To fix this, we began a PR to adjust the alignment, but it turned into a larger refactoring of the TextBlock2D, a core component connected to various parts. This was a complex task that needed careful handling. After sorting out the TextBlock2D, we returned to the SpinBoxUI and made a few tweaks. Once we were confident with the changes, the PR was successfully merged after thorough review and testing.</p> <p>Pull Requests:</p> <ul> <li><strong>SpinBoxUI (Merged)</strong> - <a href="https://github.com/fury-gl/fury/pull/499">https://github.com/fury-gl/fury/pull/499</a></li> </ul> <p style="text-align: center;"><img alt="SpinBoxUI" height="500" src="https://user-images.githubusercontent.com/64432063/263165327-c0b19cdc-9ebd-433a-8ff1-99e706a76508.gif"></p> <h3>TextBlock2D Refactoring:</h3> <p>This was a significant aspect of the GSoC period and occupied a substantial portion of the timeline. The process began when we observed misaligned text in the SpinBoxUI, as previously discussed. The root cause of the alignment issue was the mispositioning of the text actor concerning the background actor. The text actor's independent repositioning based on justification conflicted with the static position of the background actor, leading to the alignment problem.</p> <p>To address this, the initial focus was on resolving the justification issue. However, as the work progressed, we recognized that solely adjusting justification would not suffice. The alignment was inherently linked to the UI's size, which was currently retrieved only when a valid scene was present. This approach lacked scalability and efficiency, as it constrained size retrieval to scene availability.</p> <p>To overcome these challenges, we devised a solution involving the creation of a bounding box around the TextBlock2D. This bounding box would encapsulate the size information, enabling proper text alignment. This endeavor spanned several weeks of development, culminating in a finalized solution that underwent rigorous testing before being merged.</p> <p>As a result of this refactoring effort, the TextBlock2D now offers three distinct modes:</p> <ol> <li><strong>Fully Static Background:</strong> This mode requires background setup during initialization.</li> <li><strong>Dynamic Background:</strong> The background dynamically scales based on the text content.</li> <li><strong>Auto Font Scale Mode:</strong> The font within the background box automatically scales to fill the available space.</li> </ol> <p>An issue has been identified with TextBlock2D where its text actor aligns with the top boundary of the background actor, especially noticeable with letters like "g," "y," and "j". These letters extend beyond the baseline of standard alphabets, causing the text box to shift upwards.</p> <p>However, resolving this matter is complex. Adjusting the text's position might lead to it touching the bottom boundary, especially in font scale mode, resulting in unexpected positioning and transformations. To address this, the plan is to defer discussions about this matter until after GSoC, allowing for thorough consideration and solutions.</p> <p>For more detailed insights into the individual steps and nuances of this process, you can refer to the comprehensive weekly blog post provided below. It delves into the entire journey of this TextBlock2D refactoring effort.</p> <p>Pull Requests:</p> <ul> <li><strong>Fixing Justification Issue - 1st Draft (Closed)</strong> - <a href="https://github.com/fury-gl/fury/pull/790">https://github.com/fury-gl/fury/pull/790</a></li> <li><b>Adding BoundingBox and fixing Justification (Merged)</b> - <a href="https://github.com/fury-gl/fury/pull/803">https://github.com/fury-gl/fury/pull/803</a></li> <li><strong>Adding getters and setter for properties (Merged)</strong> - <a href="https://github.com/fury-gl/fury/pull/830">https://github.com/fury-gl/fury/pull/830</a></li> <li><strong>Text Offset PR (Closed)</strong> - <a href="https://github.com/fury-gl/fury/pull/837">https://github.com/fury-gl/fury/pull/837</a></li> </ul> <p style="text-align: center;"><img alt="TextBlock2D Feature Demo" height="500" src="https://user-images.githubusercontent.com/64432063/258603191-d540105a-0612-450e-8ae3-ca8aa87916e6.gif"></p> <p style="text-align: center;"><img alt="TextBlock2D All Justification" height="500" src="https://github-production-user-asset-6210df.s3.amazonaws.com/64432063/254652569-94212105-7259-48da-8fdc-41ee987bda84.png"></p> <h3>ScrollbarUI as Independent Element:</h3> <p>We initially planned to make the scrollbar independent based on PR <a href="https://github.com/fury-gl/fury/pull/16">#16</a>. The main goal was to avoid redundancy by not rewriting the scrollbar code for each element that requires it, such as the FileMenu2D. However, upon further analysis, we realized that elements like the FileMenu2D and others utilize the Listbox2D, which already includes an integrated scrollbar. We also examined other UI libraries and found that they also have independent scrollbars but lack a proper use case. Typically, display containers like Listbox2D are directly used instead of utilizing an independent scrollbar.</p> <p>Based on these findings, we have decided to close all related issues and pull requests for now. If the need arises in the future, we can revisit this topic.</p> <p><strong>Topic:</strong> - <a href="https://github.com/fury-gl/fury/discussions/816">https://github.com/fury-gl/fury/discussions/816</a></p> <h2>Other Objectives</h2> <h3>Reviewing &amp; Merging:</h3> <p>In this phase, my focus was not on specific coding but rather on facilitating the completion of ongoing PRs. Here are two instances where I played a role:</p> <ol> <li>   <strong>CardUI PR:</strong><br> I assisted with the CardUI PR by aiding in the rebase process and reviewing the changes. The CardUI is a simple UI element consisting of an image and a description, designed to function like a flash card. I worked closely with my mentor to ensure a smooth rebase and review process.                  </li> <li>        <img alt="CardUI" height="500" src="https://user-images.githubusercontent.com/54466356/112532305-b090ef80-8dce-11eb-90a0-8d06eed55993.png">     <ul> <li><strong>CardUI (Merged)</strong> - <a href="https://github.com/fury-gl/fury/pull/398">https://github.com/fury-gl/fury/pull/398</a><br>       </li> </ul> </li> <li> <strong>ComboBox Issue:</strong> <br> There was an issue with the ComboBox2D functionality, where adding it to a TabUI caused all elements to open simultaneously, which shouldn't be the case. I tested various PRs addressing this problem and identified a suitable solution. I then helped the lead in reviewing the PR that fixed the issue, which was successfully merged. <ul> <li><strong>ComboBox Flaw (Merged)</strong> - <a href="https://github.com/fury-gl/fury/pull/768">https://github.com/fury-gl/fury/pull/768</a><br>    </li> </ul> </li> </ol> <h3>Updating Broken Website Links:</h3> <p>I addressed an issue with malfunctioning links in the Scientific Section of the website. The problem emerged from alterations introduced in PR <a href="https://github.com/fury-gl/fury/pull/769">#769</a>. These changes consolidated demos and examples into a unified "auto_examples" folder, and a toml file was utilized to retrieve this data and construct examples. However, this led to challenges with the paths employed in website generation. My responsibility was to rectify these links, ensuring they accurately direct users to the intended content.    </p> <ul> <li><strong>Updating Broken Links (Merged)</strong> - <a href="https://github.com/fury-gl/fury/pull/820">https://github.com/fury-gl/fury/pull/820</a></li> </ul> <p> </p> <h2>Objectives in Progress</h2> <h3>FileDialogUI:</h3> <p>An existing FileDialog PR by Soham (<a href="https://github.com/fury-gl/fury/pull/294">#294</a>) was worked upon. The primary task was to rebase the PR to match the current UI structure, resolving compatibility concerns with the older base. In PR <a href="https://github.com/fury-gl/fury/pull/832">#832</a>, we detailed issues encompassing resizing FileDialog and components, addressing text overflow, fixing ZeroDivisionError, and correcting ListBox2D item positioning. The PR is complete with comprehensive testing and documentation. Presently, it's undergoing review, and upon approval, it will be prepared for integration.    </p> <ul> <li><strong>Soham's FileDialog (Closed)</strong> - <a href="https://github.com/fury-gl/fury/pull/294">https://github.com/fury-gl/fury/pull/294</a></li> <li><strong>FileDialogUI (Under Review)</strong> - <a href="https://github.com/fury-gl/fury/pull/832">https://github.com/fury-gl/fury/pull/832</a></li> </ul> <p> </p> <p style="text-align: center;"><img alt="FileDialogUI" height="500" src="https://user-images.githubusercontent.com/64432063/263189092-6b0891d5-f0ef-4185-8b17-c7104f1a7d60.gif"></p> <h3>TreeUI:</h3> <p>Continuing Antriksh's initial PR for TreeUI posed some challenges. Antriksh had set the foundation, and I picked up from there. The main issue was with the visibility of TreeUI due to updates in the set_visibility method of Panel2D. These updates affected how TreeUI was displayed, and after investigating the actors involved, it was clear that the visibility features had changed. This took some time to figure out, and I had a helpful pair programming session with my mentor, Serge, to narrow down the problem. Now, I've updated the code to address this issue. However, I'm still a bit cautious about potential future problems. The PR is now ready for review.    </p> <ul> <li><strong>TreeUI (In Progress)</strong> - <a href="https://github.com/fury-gl/fury/pull/821">https://github.com/fury-gl/fury/pull/821</a></li> </ul> <p> </p> <p style="text-align: center;"><img alt="TreeUI" height="500" src="https://user-images.githubusercontent.com/64432063/263237308-70e77ba0-1ce8-449e-a79c-d5e0fbb58b45.gif"></p> <h2>GSoC Weekly Blogs</h2> <p>My blog posts can be found at <a href="https://fury.gl/latest/blog/author/praneeth-shetty.html">FURY website</a> and <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/">Python GSoC blog</a>.<br>  </p> <h2>Timeline </h2> <table> <tbody> <tr> <th>Date</th> <th>Description</th> <th>Blog Post Link</th> </tr> <tr> <td>Week 0<br> (27-05-2023)</td> <td>Community Bounding Period</td> <td><a href="https://fury.gl/latest/posts/2023/2023-06-02-week-0-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/gsoc-2023-community-bonding-period/">Python</a></td> </tr> <tr> <td>Week 1<br> (03-06-20223)</td> <td>Working with SpinBox and TextBox Enhancements</td> <td><a href="https://fury.gl/latest/posts/2023/2023-06-03-week-1-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-1-working-with-spinbox-and-textbox-enhancements/">Python</a></td> </tr> <tr> <td>Week 2<br> (10-06-2023)</td> <td>Tackling Text Justification and Icon Flaw Issues</td> <td><a href="https://fury.gl/latest/posts/2023/2023-06-11-week-2-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-2-tackling-text-justification-and-icon-flaw-issues/">Python</a></td> </tr> <tr> <td>Week 3<br> (17-06-2023)</td> <td>Resolving Combobox Icon Flaw and TextBox Justification</td> <td><a href="https://fury.gl/latest/posts/2023/2023-06-17-week-3-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-3-resolving-combobox-icon-flaw-and-textbox-justification/">Python</a></td> </tr> <tr> <td>Week 4<br> (24-06-2023)</td> <td>Exam Preparations and Reviewing</td> <td><a href="https://fury.gl/latest/posts/2023/2023-06-24-week-4-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-4-exam-preparations-and-reviewing/">Python</a></td> </tr> <tr> <td>Week 5<br> (01-07-2023)</td> <td>Trying out PRs and Planning Ahead</td> <td><a href="https://fury.gl/latest/posts/2023/2023-07-01-week-5-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-5-testing-out-prs-and-planning-ahead/">Python</a></td> </tr> <tr> <td>Week 6<br> (08-07-2023)</td> <td>BoundingBox for TextBlock2D!</td> <td><a href="https://fury.gl/latest/posts/2023/2023-07-08-week-6-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-6-boundingbox-for-textblock2d/">Python</a></td> </tr> <tr> <td>Week 7<br> (15-07-2023)</td> <td>Sowing the seeds for TreeUI</td> <td><a href="https://fury.gl/latest/posts/2023/2023-07-15-week-7-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-7-sowing-the-seeds-for-treeui/">Python</a></td> </tr> <tr> <td>Week 8<br> (22-07-2023)</td> <td>Another week with TextBlockUI</td> <td><a href="https://fury.gl/latest/posts/2023/2023-07-22-week-8-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-8-another-week-with-textblockui/">Python</a></td> </tr> <tr> <td>Week 9<br> (29-07-2023)</td> <td>TextBlock2D is Finally Merged!</td> <td><a href="https://fury.gl/latest/posts/2023/2023-07-29-week-9-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-9-textblock2d-is-finally-merged/">Python</a></td> </tr> <tr> <td>Week 10<br> (05-08-2023)</td> <td>Completing the Initial Version of AccordionUI</td> <td><a href="https://fury.gl/latest/posts/2023/2023-08-05-week-10-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-10-completing-the-initial-version-of-accordionui/">Python</a></td> </tr> <tr> <td>Week 11<br> (12-08-2023)</td> <td>TreeUI Updates and Code Revisions</td> <td><a href="https://fury.gl/latest/posts/2023/2023-08-12-week-11-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-11-treeui-updates-and-code-revisions/">Python</a></td> </tr> <tr> <td>Week 12<br> (19-08-2023)</td> <td>Wrapping Things Up</td> <td><a href="https://fury.gl/latest/posts/2023/2023-08-19-week-12-praneeth.html">FURY</a> - <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-12-wrapping-things-up/">Python</a></td> </tr> </tbody> </table>praneethshetty10@gmail.com (ganimtron_10)Fri, 25 Aug 2023 17:22:22 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/google-summer-of-code-final-work-product-4/Week 12: FileDialog Quest Begins!https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-12-filedialog-quest-begins/<h1>What did you do this week?</h1> <p>During this week, I initiated my work on the FileDialog PR, which had been started by Soham. The initial version of the FileDialog can be found at <a href="https://github.com/fury-gl/fury/pull/294">#294</a>. To start, I focused on rebasing the PR. Since this PR was based on an older version, there were some updates to the overall UI structure that needed to be addressed for compatibility. While handling this, I identified a set of issues that I documented in the current PR <a href="https://github.com/fury-gl/fury/pull/832">#832</a>. These mainly revolved around:</p> <p>1. Resizing <strong>FileDialog</strong> and realted components.</p> <p>2. Rectifying the text overflow problem.</p> <p>3. Dealing with a <strong>ZeroDivisionError</strong>.</p> <p>4. Fixing the positioning of items in the <strong>ListBox2D</strong>.</p> <p> </p> <p>I systematically approached each of these challenges:</p> <p><strong>Resizing FileMenu and Related Components:</strong> This was a fairly complex task since it involved intricate dependencies, such as the <strong>FileDialog </strong>relying on the <strong>FileMenu</strong>, which, in turn, was dependent on <strong>ListBox2D</strong> and <strong>Panel2D</strong> resizing. To make the process manageable, I decided to progress incrementally in a seperate PR a bit later.</p> <p><strong>Text Overflow Issue:</strong> The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the <strong>TextBlock2D </strong>had a scene property. Although this approach suited the previous version of <strong>TextBlock2D</strong>, the recent refactoring led to the removal of this property. The scene was previously utilized to determine the text actor's size. However, we had new methodologies to calculate these sizes, which are detailed in <a href="https://github.com/fury-gl/fury/pull/803">#803</a>.</p> <p style="text-align: center;"><img alt="" height="268" src="https://github.com/fury-gl/fury/assets/64432063/b001f9d3-a5e8-45ad-8605-85df595b5654" width="449"></p> <p style="text-align: center;"><img alt="" height="269" src="https://github.com/fury-gl/fury/assets/64432063/d3c9c3a3-e601-45ab-8975-2b1e98acf1d3" width="397"></p> <p><strong>Addressing ZeroDivisionError:</strong> The <strong>ZeroDivisionError</strong> emerged when the total number of values were same as the number of slots. The issue lay in the separation of these values for calculating the scrollbar's height parameter. Unfortunately, this calculation error occurred when this would return us zero while updating the scrollbar. To counter this, I implemented a conditional check to ascertain whether the value is zero or not.</p> <p><strong>Correcting ListBox2D Item Positioning:</strong> Another challenge I encountered related to the improper positioning of <strong>ListBox2D</strong> item's background. When a slot was not visible, its background was resized to zero, and visibility was set to off. Consequently, during the calculation of updated positions, the height was considered zero, leading to mispositioning. I resolved this by refraining from resizing and solely toggling visibility, achieving the desired result.</p> <p style="text-align: center;"><img alt="" height="273" src="https://github.com/fury-gl/fury/assets/64432063/e2805934-b037-47fd-872c-0b284b298d3c" width="407"></p> <p style="text-align: center;"><img alt="" height="266" src="https://github.com/fury-gl/fury/assets/64432063/3bc1aabb-bb79-4e26-817d-a2a2ddd20ea3" width="394"></p> <p> </p> <h1>Did you get stuck anywhere?</h1> <p>Among the challenges I faced, one notable instance involved addressing the visibility issue in <strong>TreeUI</strong>. Despite my attempts at various solutions, none yielded the desired outcome. The <strong>TreeUI</strong> exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution.<br>  </p> <h1>What is coming up next?</h1> <p>The <strong>FileDialog</strong> implementation is nearly finalized, and my plan is to work on any review, feedback or suggestions that might arise. Following this, I will shift my attention towards addressing the <strong>TreeUI</strong>.</p> <p><br>  </p>praneethshetty10@gmail.com (ganimtron_10)Sun, 20 Aug 2023 16:13:23 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-12-filedialog-quest-begins/Week 11: Bye Bye Spinboxhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-11-bye-bye-spinbox/<h1>What did you do this week?</h1> <p>Building upon the progress of the previous week, a major milestone was reached with the merging of PR <a href="https://github.com/fury-gl/fury/pull/830">#830</a>. This PR added essential "getters" and "setters" for the new features of <strong>TextBlock</strong>, making it easier to handle changes. This, in turn, facilitated the integration of <strong>SpinBoxUI </strong>with the updated <strong>TextBlock</strong>.</p> <p>However, while working on <strong>SpinBoxUI</strong>, a critical issue emerged. As <strong>SpinBoxUI </strong>allows users to input characters and symbols into an editable textbox, it posed a risk of program crashes due to invalid inputs. To counter this, I introduced a validation check to ensure that the input was a valid number. If valid, the input was converted; otherwise, it reverted to the previous value. After thorough testing and review, PR <a href="https://github.com/fury-gl/fury/pull/499">#499</a> was successfully merged.</p> <p>Meanwhile, a concern with the textbox's behavior was identified when <strong>SpinBoxUI </strong>was scaled to a larger size. Specifically, the text occasionally touched the top or bottom boundary, creating an overflow appearance. Although initial solutions were attempted, the complexity of the issue required further consideration. This issue has been documented in more detail in Issue <a href="https://github.com/fury-gl/fury/pull/838">#838</a>, where it is marked as a low-priority item.</p> <h1>Did you get stuck anywhere?</h1> <p>The challenge of the week centered around addressing the textbox's overflow behavior in <strong>SpinBoxUI</strong>.</p> <h1>What is coming up next?</h1> <p>Looking ahead, the focus remains on refining the <strong>FileDialog </strong>component, as the significant progress with <strong>TextBlock </strong>and <strong>SpinBoxUI </strong>prepares us to shift attention to other aspects of development.</p>praneethshetty10@gmail.com (ganimtron_10)Tue, 15 Aug 2023 13:41:51 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-11-bye-bye-spinbox/Week 10: Its time for a Spin-Box!https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-10-its-time-for-a-spin-box/<h1>What did you do this week?</h1> <p>This week, my focus shifted to the <strong>SpinBoxUI </strong>after wrapping up work on <strong>TextBlock2D</strong>. <strong>SpinBoxUI</strong> is a component that allows users to select a value by spinning through a range. To ensure a smooth transition, I made adjustments in <strong>SpinBoxUI</strong> to align it with the recent updates in <strong>TextBlock2D</strong>. To make things even clearer and more user-friendly, I initiated a continuous code improvement process. I introduced setters and getters that enable easier customization of <strong>TextBlock2D</strong>'s new features, such as <strong>auto_font_scale</strong> and <strong>dynamic_bbox</strong>. These tools simplify the process of adjusting these settings, and you can see the ongoing changes in pull request <a href="https://github.com/fury-gl/fury/pull/830">#830</a>.</p> <p> </p> <p>Simultaneously, I worked on improving the <strong>FileDialog</strong> component. Since the <strong>FileDialog</strong> PR was based on an older version, it required updates to match the recent developments in <strong>TextBlock2D</strong>. This involved restructuring the code and making sure that everything worked smoothly together. You can checkout the progress here at PR <a href="https://github.com/fury-gl/fury/pull/832">#832</a>.</p> <p> </p> <h1>Did you get stuck anywhere?</h1> <p>Thankfully, this week was quite smooth sailing without any major roadblocks.</p> <p> </p> <h1>What is coming up next?</h1> <p>Looking ahead, my plan is to finalize the integration of the updated <strong>TextBlock </strong>and <strong>SpinBoxUI</strong> components. This entails making sure that everything works seamlessly together and is ready for the next stages of development.</p>praneethshetty10@gmail.com (ganimtron_10)Mon, 07 Aug 2023 18:37:49 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-10-its-time-for-a-spin-box/Week 9: TextBlock2D is Finally Merged!https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-9-textblock2d-is-finally-merged/<h1>What did you do this week?</h1> <p>Continuing from the previous week, it seemed like we were almost done with the <strong>TextBlock2D</strong>, but there remained a final task of addressing conflicting issues. Being a core part of the UI, <strong>TextBlock2D </strong>had a few compatibility problems with certain other UI elements.</p> <p>The default behavior of <strong>TextBox2D</strong> now includes a dynamic bounding box, which scales automatically based on the contained text. Users can customize this option through a simple flag setting. However, this change affected some UI elements like <strong>ComboBox2d</strong>, which relied on the default textbox size. Consequently, I had to make updates to ensure compatibility. Additionally, the default initialization of the <strong>TextBlock2D</strong> was completely static, which led to the possibility of the text extending beyond the background and failing certain tests. To tackle this, I made adjustments to the overflow helper function in the <strong>test_elements.py</strong> file. After a few tweaks and issue resolutions, the PR was ready for review and was successfully merged after passing the review process.</p> <p style="text-align: center;"><img alt="" height="281" src="https://user-images.githubusercontent.com/64432063/258603191-d540105a-0612-450e-8ae3-ca8aa87916e6.gif" width="500"></p> <h1>Did you get stuck anywhere?</h1> <p>I encountered some peculiar test failures that were indirectly related to the <strong>TextBlock2D</strong> which at first glance didn't came up. Although after some debugging and a thorough line-by-line analysis, I managed to identify and resolve them.</p> <p> </p> <h1>What is coming up next?</h1> <p>My next priority will be completing the <strong>SpinBoxUI </strong>now that the <strong>TextBlock2D </strong>is fixed and successfully integrated.</p>praneethshetty10@gmail.com (ganimtron_10)Mon, 31 Jul 2023 14:16:09 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-9-textblock2d-is-finally-merged/Week 8: Another week with TextBlockUIhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-8-another-week-with-textblockui/<h1>What did you do this week?</h1> <p>This week, I delved deeper into the <strong>TextBlock2D </strong>Bounding Box PR to address the challenges with tests and offsetting issues. In a pair programming session with my mentor, we discovered that the offsetting background problem stemmed from the dynamic nature of the bounding box. The issue arose when the <strong>RingSlider2D </strong>component began with an initial text size larger than the current text, which changed as the value was adjusted between 0-100%. This resulted in problems with offsetting and shrinking the bounding box. To resolve this, we decided to make the dynamic bounding box an optional feature.</p> <p>Now, the <strong>TextBlock2D</strong> component offers three main features:</p> <ol> <li>Completely static background</li> <li>Dynamic bounding box scaled according to the text</li> <li>Font scaling based on the bounding box</li> </ol> <p>After tweaking and testing, all the features work seamlessly.</p> <h1>Did you get stuck anywhere?</h1> <p>The pair programming session with my mentor proved to be immensely helpful, as It guided me through the whole week.</p> <h1>What is coming up next?</h1> <p>I will dedicate time to further enhancing the <strong>TreeUI</strong>. My focus will be on updating tree nodes and ensuring proper node positioning during movement.</p>praneethshetty10@gmail.com (ganimtron_10)Tue, 25 Jul 2023 15:19:10 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-8-another-week-with-textblockui/Week 7: Sowing the seeds for TreeUIhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-7-sowing-the-seeds-for-treeui/<h1>What did you do this week?</h1> <p><strong>TextBlock2D </strong>Bounding Box was nearly complete but the tests were failing due to automatic background resizing based on content and improper text actor alignment during setup. I encountered difficulties while positioning the text, which caused the text to appear offset and led to test failures.</p> <p>Text background greater than the actual maximum size:</p> <p style="text-align: center;"><img alt="" height="229" src="https://github.com/fury-gl/fury/assets/64432063/aaf4a764-4480-4f96-9adf-29d9e28135a6" width="350"></p> <p>Text offset from center: </p> <p style="text-align: center;"><img alt="" height="224" src="https://github.com/fury-gl/fury/assets/64432063/0a3bc1e6-a566-4c08-9ca4-a191525b9c97" width="463"></p> <p>Additionally, I reviewed PR <a href="https://github.com/fury-gl/fury/pull/814">#814</a> and noticed that after PR <a href="https://github.com/fury-gl/fury/pull/769">#769</a>, all demos and examples were merged into a single folder, which affected the paths used in the Scientific Domain Section. To address this, I created PR <a href="https://github.com/fury-gl/fury/pull/820">#820</a> to redirect the links to the correct path.</p> <p>As I faced issues with the <strong>TextBlock2D </strong>PR, I took the opportunity to rebase and continue working on the <strong>TreeUI </strong>PR since there were no updates from the author.</p> <h1>Did you get stuck anywhere?</h1> <p>While fixing the issues with the tests for the <strong>TextBlock2D </strong>bounding box, I encountered a weird behavior in text positioning when using the center alignment. The output varied depending on the sequence of repositioning.</p> <h1>What is coming up next?</h1> <p>I will continue working on the <strong>TreeUI</strong> and resolve the <strong>TextBlock2D </strong>error to ensure both PRs progress smoothly.</p>praneethshetty10@gmail.com (ganimtron_10)Mon, 17 Jul 2023 15:08:39 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-7-sowing-the-seeds-for-treeui/Week 6: BoundingBox for TextBlock2D!https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-6-boundingbox-for-textblock2d/<h1>What did you do this week?</h1> <p>This week, I worked on improving the <strong>TextBlock2D</strong> component in the UI system. I started from scratch to address alignment and scaling issues. When resizing the <strong>TextBlock2D</strong>, the text alignment and justification with the background rectangle were inconsistent. To resolve this, I introduced a new <strong>"boundingbox"</strong> property that calculates the text bounding box based on its content. Additionally, I separated the scaling mode from the resizing action with the new <strong>"auto_font_scale"</strong> property, enabling automatic font scaling according to the bounding box. This will provide better alignment, justified text, and smoother font scaling for the <strong>TextBlock2D </strong>component. Try it out at <a href="https://github.com/fury-gl/fury/pull/803">#803</a>.</p> <p> </p> <p style="text-align: center;"><img alt="" height="292" src="https://github.com/fury-gl/fury/assets/64432063/94212105-7259-48da-8fdc-41ee987bda84" width="563"></p> <p> </p> <p>As discussed last week, we also made a decision regarding the scrollbar. After exploring different use cases, we concluded that creating an independent scrollbar is not necessary at the moment. Therefore, we will close the related pull requests. You can find out more about it <a href="https://github.com/fury-gl/fury/discussions/816">here</a>.</p> <h1>Did you get stuck anywhere?</h1> <p>Implementing the bounding box feature took some extra time as I needed to carefully consider its impact on other UI elements that rely on the <strong>TextBlock2D </strong>component.</p> <h1>What is coming up next?</h1> <p>Next, I will focus on completing the TextBlock2D Bounding Box PR, which will also indirectly finalize the Spinbox PR.</p>praneethshetty10@gmail.com (ganimtron_10)Mon, 10 Jul 2023 18:33:09 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-6-boundingbox-for-textblock2d/Week 5: Testing out PRs and Planning Aheadhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-5-testing-out-prs-and-planning-ahead/<h1>What did you do this week?</h1> <p>Due to ongoing exams, my productivity was limited this week. However, I managed to find some time to explore and review a few PRs submitted by contributors:</p> <p>1. Ellipsoid PR <a href="https://github.com/fury-gl/fury/pull/791">#791</a>: This PR focuses on creating a new ellipsoid actor defined with SDF and raymarching techniques.</p> <p>2. Website Improvement PR <a href="https://github.com/fury-gl/fury/pull/812">#812</a>:   This PR includes changes for the new compatibility section on the FURY home page.</p> <p>Towards the end of the week, I had a meeting with my mentor. We discussed the current status of ongoing PRs and identified action points to focus on in the upcoming weeks. This discussion provided clarity on the challenges faced with certain PRs and issues.</p> <h1>Did you get stuck anywhere?</h1> <p>Fortunately, I didn't encounter any major roadblocks or challenges that hindered my progress this week.</p> <h1>What is coming up next?</h1> <p>With the action points provided by my mentor, I will be dedicating the next week to completing those tasks.</p>praneethshetty10@gmail.com (ganimtron_10)Mon, 03 Jul 2023 05:20:55 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-5-testing-out-prs-and-planning-ahead/Week 4: Exam Preparations and Reviewinghttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-4-exam-preparations-and-reviewing/<h1>What did I do this week?</h1> <p>This week, amidst end-semester exams, I managed to accomplish a few notable tasks. Let's dive into the highlights:</p> <p>1. Merging <strong>CardUI</strong>: The PR <a href="https://github.com/fury-gl/fury/pull/398">#398</a> introduced the <strong>CardUI</strong> to the UI system of FURY. After a successful review and test check, it was merged into the codebase</p> <p>2. Revisiting PR <a href="https://github.com/fury-gl/fury/pull/540">#540</a>: I restarted working on PR <a href="https://github.com/fury-gl/fury/pull/540">#540</a> as I wasn't satisfied with the previous approach when I checked it for rebasing. I took the opportunity to update the code and ensure that the unit tests passed successfully. Although there are a few issues remaining in the tests, I am determined to resolve them and move forward with the implementation. This PR aims to improve the usage of the <strong>numpy_to_vtk_image_data</strong> utility function.</p> <p>3. Independent Scrollbar Consideration: We are currently evaluating the necessity of making the Scrollbar an independent element. While currently, it is primarily used by the <strong>ListBox2D</strong>, we are exploring various use cases to determine if there are other scenarios where the Scrollbar can be employed independently. This evaluation will help us make an informed decision about its future implementation.</p> <h1>Did I get stuck anywhere?</h1> <p>No, fortunately, I didn't encounter any major obstacles or challenges during my tasks this week.</p> <h1>What is coming up next?</h1> <p>Once the exams are over, I am eagerly looking forward to making a full comeback to development. My immediate plans include addressing the remaining issues in PR <a href="https://github.com/fury-gl/fury/pull/540">#540</a> and completing the pending tasks. I will also catch up on any missed discussions and sync up with the team to align our goals for the upcoming weeks.</p>praneethshetty10@gmail.com (ganimtron_10)Sun, 25 Jun 2023 18:10:01 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-4-exam-preparations-and-reviewing/Week 3: Resolving Combobox Icon Flaw and TextBox Justificationhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-3-resolving-combobox-icon-flaw-and-textbox-justification/<h1>What did you do this week?</h1> <p>This week, I tackled the <strong>ComboBox2D </strong>icon flaw, which was addressed using Pull Request (PR) <a href="https://github.com/fury-gl/fury/pull/576">#576</a>. The problem arose when we added a <strong>ComboBox2D </strong>to the <strong>TabUI</strong>. The <strong>TabUI </strong>would propagate the <code>set_visibility = true</code> for all its child elements, causing the combobox to appear on the screen without the icon change. To fix this issue, <a href="https://github.com/fury-gl/fury/pull/768">#768</a> updated the <code>set_visibility</code> method of the UI class, ensuring that the icon change was applied correctly.</p> <p style="text-align: center;"><img alt="" height="233" src="https://user-images.githubusercontent.com/98275514/215267056-a0fd94d9-ae6d-4cf8-8475-ab95fe0ef303.png" width="386"></p> <p>Next, I focused on the textbox justification. As discussed in our meeting, I added a new property called boundingbox to the <strong>TextBlock2D</strong>. However, I encountered a problem when resizing the <strong>TextBlock2D</strong>. The `<code>vtkTextActor</code>` property would switch from `<code>SetTextScaleModeToNone</code>` to `<code>SetTextScaleModeToProp</code>` , which would scale the font according to the position1 (lower left corner) and position2 (upper right corner) of the UI. This inconsistency in font scaling resulted in misaligned text actors. I spent some time investigating this issue, and you can find my progress in the ongoing PR <a href="https://github.com/fury-gl/fury/pull/803">#803</a>.</p> <p>Additionally, I started working on creating a Scrollbar component by inheriting the <strong>LineSlider2D</strong>. I made adjustments to the position and other attributes to make it function as a scrollbar. However, I encountered some confusion regarding how to separate the scrollbar component from other elements and determine what should be included in the scrollbar itself.</p> <p style="text-align: center;"><img alt="" height="215" src="https://github.com/fury-gl/fury/assets/64432063/d9c8d60e-3ade-49ff-804a-fd0b340b0b24" width="403"></p> <h1>Did you get stuck anywhere?</h1> <p>I faced a challenge while working on the text justification. It took me several days to identify the root cause of the occasional malfunctioning of the <strong>TextBlock2D</strong>. Atlast, I found out the reason behind the issue.</p> <h1>What is coming up next?</h1> <p>Next week, I have several tasks lined up. Firstly, I will be working on the <strong>CardUI </strong>PR <a href="https://github.com/fury-gl/fury/pull/398">#398</a>. Additionally, I plan to complete the segregation of the scrollbar component, ensuring its independence and clarity. Lastly, I will be working on issue <a href="https://github.com/fury-gl/fury/pull/540">#540</a>, which involves updating the use of the `<code>numpy_to_vtk_image_data</code>` utility function.</p>praneethshetty10@gmail.com (ganimtron_10)Sun, 18 Jun 2023 19:49:26 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-3-resolving-combobox-icon-flaw-and-textbox-justification/Week 2: Tackling Text Justification and Icon Flaw Issueshttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-2-tackling-text-justification-and-icon-flaw-issues/<h1>What did you do this week?</h1> <p>This week, I continued tweaking the text justification PR <a href="https://github.com/fury-gl/fury/pull/790">#790</a> and encountered a new issue when combining both <strong>justification</strong> and <strong>vertical_justification</strong>. The problem arose because the <strong>vertical_justification </strong>did not take into account the applied <strong>justification</strong>, resulting in unexpected behavior. I focused on resolving this issue by ensuring that both justifications work together correctly. Additionally, during the weekly meeting, we discussed the problem and decided to introduce new properties such as boundaries and padding to enhance the functionality of the text justification feature.</p> <p>Furthermore, I started working on PR <a href="https://github.com/fury-gl/fury/pull/576">#576</a>, which aimed to address the flaw in the icon of the <strong>combobox</strong>. While investigating this issue, I discovered related problems and PRs, including <a href="https://github.com/fury-gl/fury/pull/562">#562</a>, <a href="https://github.com/fury-gl/fury/pull/731">#731</a>, and <a href="https://github.com/fury-gl/fury/pull/768">#768</a>. The main challenge was related to the propagation of the <strong>set_visibility</strong> feature of the UI, causing the <strong>combobox </strong>to automatically open its options. To overcome this issue, I requested the author of PR <a href="https://github.com/fury-gl/fury/pull/768">#768</a> to rebase their pull request as it can be a solution for the issue.</p> <h1>Did you get stuck anywhere?</h1> <p>A significant portion of my time was dedicated to resolving the text justification issue when both justification types were combined. It required careful analysis and adjustments to ensure the desired behavior.</p> <h1>What is coming up next?</h1> <p>For the upcoming week, I have the following plans:</p> <p>1. Work on modifying the text justification implementation to address any remaining issues and ensure compatibility with other features.<br> 2. Begin the implementation of the scrollbar class from scratch to provide a robust and customizable scrollbar element.<br> 3. Focus on completing the resolution of the icon flaw issue by collaborating with the relevant stakeholders and ensuring the necessary modifications are made.</p>praneethshetty10@gmail.com (ganimtron_10)Sun, 11 Jun 2023 20:18:31 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-2-tackling-text-justification-and-icon-flaw-issues/Week 1: Working with SpinBox and TextBox Enhancementshttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-1-working-with-spinbox-and-textbox-enhancements/<h1>What did you do this week?</h1> <p>This week, my focus was on reviewing pull requests (PRs) and issues related to the user interface (UI) of the project. I meticulously went through each PR and issue, identifying those specifically associated with UI improvements. To streamline the process, I categorized them accordingly under the UI category. One of the key tasks was PR <a href="https://github.com/fury-gl/fury/pull/499">#499</a>, which involved the implementation of SpinBoxUI. After rebasing the PR, I identified an alignment issue with the textbox component.</p> <p>To resolve this issue, I started by investigating the root cause. I discovered that the alignment was initially based on the position of the parent UI, which caused the text to extend beyond the boundaries of the textbox. To rectify this, I devised a solution where I calculated the background size of the textbox and adjusted the text's position accordingly. By aligning the text with the calculated size, I ensured a proper and visually appealing alignment within the textbox.</p> <p>To provide a clear understanding of the improvement, I have prepared a comparison of the textbox alignment before and after the modifications:</p> <p>Before:<br> <img alt="" height="415" src="https://user-images.githubusercontent.com/64432063/243150149-30330be2-b529-47e9-850a-6e3a8bc03551.png" width="376"></p> <p>After:<br> <img alt="" height="415" src="https://user-images.githubusercontent.com/64432063/243150735-86f85d6c-f9df-4092-abdf-248b6ec77c5e.png" width="376"></p> <p> </p> <h1>Did you get stuck anywhere?</h1> <p><br> Fortunately, I didn't encounter any significant challenges this week.</p> <p> </p> <h1>What is coming up next?</h1> <p><br> Looking ahead, here's what I have planned for the upcoming week:</p> <ol> <li> <p>Completing PR <a href="https://github.com/fury-gl/fury/pull/790">#790</a> - Fixing Textbox Alignment</p> </li> <li> <p>Wrapping up PR <a href="https://github.com/fury-gl/fury/pull/499">#499</a> - SpinBoxUI</p> </li> <li> <p>Initiating PR <a href="https://github.com/fury-gl/fury/pull/576">#576</a> - Icon Flaw in ComboBox</p> </li> </ol>praneethshetty10@gmail.com (ganimtron_10)Thu, 08 Jun 2023 04:24:27 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/week-1-working-with-spinbox-and-textbox-enhancements/GSoC 2023: Community Bonding Periodhttps://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/gsoc-2023-community-bonding-period/<p>Hello All!</p> <p>I'm thrilled to announce that I'll be participating in Google Summer of Code (GSoC) for yet another year. To catch a glimpse of my previous journey, check out my experiences <a href="https://blogs.python-gsoc.org/en/ganimtron_10s-blog/">here</a>.</p> <p>During the community bonding period, we had our first GSoC meet, where we got acquainted with the program's rules and regulations. It was an excellent opportunity to virtually meet my fellow contributors and discuss our upcoming projects. Excitement filled the air as we exchanged ideas and set goals for the summer ahead.<br> <br> Stay tuned for updates on my GSoC project as I share my progress, challenges, and breakthroughs along the way. I'm grateful for the opportunity to be part of this remarkable community and can't wait to witness the incredible projects that will unfold during GSoC 2023.</p>praneethshetty10@gmail.com (ganimtron_10)Fri, 02 Jun 2023 15:05:15 +0000https://blogs.python-gsoc.org/en/ganimtron_10s-blog-copy-2/gsoc-2023-community-bonding-period/