From ed4c9f697828107598e89db3327d311e564b4962 Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Sun, 20 Aug 2023 21:36:53 +0530 Subject: [PATCH 1/6] adding weekly blogpost --- .../2023/2023-08-19-week-12-praneeth.rst | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/source/posts/2023/2023-08-19-week-12-praneeth.rst diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst new file mode 100644 index 000000000..eb372754d --- /dev/null +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -0,0 +1,38 @@ +Week 12: FileDialog Quest Begins! +================================= + +.. post:: August 19, 2023 + :author: Praneeth Shetty + :tags: google + :category: gsoc + + +What did you do this week? +-------------------------- +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 #294. 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 #832. These mainly revolved around: + +1. Resizing ``FileDialog`` and realted components. +2. Rectifying the text overflow problem. +3. Dealing with a ``ZeroDivisionError``. +4. Fixing the positioning of items in the ``ListBox2D``. + +I systematically approached each of these challenges: + +**Resizing FileMenu and Related Components:** This was a fairly complex task since it involved intricate dependencies, such as the ``FileDialog`` relying on the ``FileMenu``, which, in turn, was dependent on ``ListBox2D`` and ``Panel2D`` resizing. To make the process manageable, I decided to progress incrementally in a seperate PR a bit later. + +**Text Overflow Issue:** The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the ``TextBlock2D`` had a scene property. Although this approach suited the previous version of ``TextBlock2D``, 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 #803. + +**Addressing ZeroDivisionError:** The ``ZeroDivisionError`` 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. + +**Correcting ``ListBox2D`` Item Positioning:** Another challenge I encountered related to the improper positioning of ``ListBox2D`` 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. + + +Did you get stuck anywhere? +--------------------------- +Among the challenges I faced, one notable instance involved addressing the visibility issue in ``TreeUi``. Despite my attempts at various solutions, none yielded the desired outcome. The ``TreeUi`` exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution. + + +What is coming up next? +----------------------- +The ``FileDialog`` 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 ``TreeUI``. + From d3ac712a86795a5305929394215259ef3ad494a8 Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Sun, 20 Aug 2023 21:44:09 +0530 Subject: [PATCH 2/6] updating links --- docs/source/posts/2023/2023-08-19-week-12-praneeth.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst index eb372754d..4cb4289ca 100644 --- a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -9,7 +9,7 @@ Week 12: FileDialog Quest Begins! What did you do this week? -------------------------- -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 #294. 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 #832. These mainly revolved around: +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 `#294 `_. 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 `#832 `_. These mainly revolved around: 1. Resizing ``FileDialog`` and realted components. 2. Rectifying the text overflow problem. @@ -20,7 +20,7 @@ I systematically approached each of these challenges: **Resizing FileMenu and Related Components:** This was a fairly complex task since it involved intricate dependencies, such as the ``FileDialog`` relying on the ``FileMenu``, which, in turn, was dependent on ``ListBox2D`` and ``Panel2D`` resizing. To make the process manageable, I decided to progress incrementally in a seperate PR a bit later. -**Text Overflow Issue:** The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the ``TextBlock2D`` had a scene property. Although this approach suited the previous version of ``TextBlock2D``, 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 #803. +**Text Overflow Issue:** The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the ``TextBlock2D`` had a scene property. Although this approach suited the previous version of ``TextBlock2D``, 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 `#803 `_. **Addressing ZeroDivisionError:** The ``ZeroDivisionError`` 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. From 5f2cf718868d7eb4128f523658cdecb48f5a3534 Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Sun, 20 Aug 2023 23:53:52 +0530 Subject: [PATCH 3/6] updating spelling --- docs/source/posts/2023/2023-08-19-week-12-praneeth.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst index 4cb4289ca..78161f91b 100644 --- a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -29,7 +29,7 @@ I systematically approached each of these challenges: Did you get stuck anywhere? --------------------------- -Among the challenges I faced, one notable instance involved addressing the visibility issue in ``TreeUi``. Despite my attempts at various solutions, none yielded the desired outcome. The ``TreeUi`` exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution. +Among the challenges I faced, one notable instance involved addressing the visibility issue in ``TreeUI``. Despite my attempts at various solutions, none yielded the desired outcome. The ``TreeUI`` exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution. What is coming up next? From 6fba82573fa648a2bdd896ba25a5e3d407f5764d Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Sun, 20 Aug 2023 23:56:04 +0530 Subject: [PATCH 4/6] updating spelling --- docs/source/posts/2023/2023-08-19-week-12-praneeth.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst index 4cb4289ca..5c01dede1 100644 --- a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -11,14 +11,14 @@ What did you do this week? -------------------------- 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 `#294 `_. 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 `#832 `_. These mainly revolved around: -1. Resizing ``FileDialog`` and realted components. +1. Resizing ``FileDialog`` and related components. 2. Rectifying the text overflow problem. 3. Dealing with a ``ZeroDivisionError``. 4. Fixing the positioning of items in the ``ListBox2D``. I systematically approached each of these challenges: -**Resizing FileMenu and Related Components:** This was a fairly complex task since it involved intricate dependencies, such as the ``FileDialog`` relying on the ``FileMenu``, which, in turn, was dependent on ``ListBox2D`` and ``Panel2D`` resizing. To make the process manageable, I decided to progress incrementally in a seperate PR a bit later. +**Resizing FileMenu and Related Components:** This was a fairly complex task since it involved intricate dependencies, such as the ``FileDialog`` relying on the ``FileMenu``, which, in turn, was dependent on ``ListBox2D`` and ``Panel2D`` resizing. To make the process manageable, I decided to progress incrementally in a separate PR a bit later. **Text Overflow Issue:** The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the ``TextBlock2D`` had a scene property. Although this approach suited the previous version of ``TextBlock2D``, 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 `#803 `_. @@ -29,7 +29,7 @@ I systematically approached each of these challenges: Did you get stuck anywhere? --------------------------- -Among the challenges I faced, one notable instance involved addressing the visibility issue in ``TreeUi``. Despite my attempts at various solutions, none yielded the desired outcome. The ``TreeUi`` exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution. +Among the challenges I faced, one notable instance involved addressing the visibility issue in ``TreeUI``. Despite my attempts at various solutions, none yielded the desired outcome. The ``TreeUI`` exhibited either full visibility or no visibility at all. In this situation, I sought guidance from my mentor to find a viable solution. What is coming up next? From a94d39ba4be15df2a8e27a18e3dc191f878db8ec Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Mon, 21 Aug 2023 00:11:12 +0530 Subject: [PATCH 5/6] adding images --- .../posts/2023/2023-08-19-week-12-praneeth.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst index 5c01dede1..6c7445ab3 100644 --- a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -22,10 +22,25 @@ I systematically approached each of these challenges: **Text Overflow Issue:** The problem with text overflow was rooted in our previous approach, which involved executing these actions only when the ``TextBlock2D`` had a scene property. Although this approach suited the previous version of ``TextBlock2D``, 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 `#803 `_. +.. image:: https://github.com/fury-gl/fury/assets/64432063/b001f9d3-a5e8-45ad-8605-85df595b5654 + :align: center + :alt: Text Overflow Before + +.. image:: https://github.com/fury-gl/fury/assets/64432063/d3c9c3a3-e601-45ab-8975-2b1e98acf1d3 + :align: center + :alt: Text Overflow After + **Addressing ZeroDivisionError:** The ``ZeroDivisionError`` 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. **Correcting ``ListBox2D`` Item Positioning:** Another challenge I encountered related to the improper positioning of ``ListBox2D`` 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. +.. image:: https://github.com/fury-gl/fury/assets/64432063/e2805934-b037-47fd-872c-0b284b298d3c + :align: center + :alt: ListBox2D mispositioning Before + +.. image:: https://github.com/fury-gl/fury/assets/64432063/3bc1aabb-bb79-4e26-817d-a2a2ddd20ea3 + :align: center + :alt: Fixed ListBox2D mispositioning Did you get stuck anywhere? --------------------------- From 8b7e0ea0b419f4fe1c853e710cd5f4ffbeda7f26 Mon Sep 17 00:00:00 2001 From: Praneeth Shetty Date: Wed, 23 Aug 2023 12:03:17 +0530 Subject: [PATCH 6/6] working on review --- docs/source/posts/2023/2023-08-19-week-12-praneeth.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst index 6c7445ab3..d34b54ad0 100644 --- a/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst +++ b/docs/source/posts/2023/2023-08-19-week-12-praneeth.rst @@ -30,7 +30,7 @@ I systematically approached each of these challenges: :align: center :alt: Text Overflow After -**Addressing ZeroDivisionError:** The ``ZeroDivisionError`` 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. +**Addressing ZeroDivisionError:** The ``ZeroDivisionError`` emerged when the total number of values was the 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. **Correcting ``ListBox2D`` Item Positioning:** Another challenge I encountered related to the improper positioning of ``ListBox2D`` 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.