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:
FileDialogand related components.
Rectifying the text overflow problem.
Dealing with a
Fixing the positioning of items in the
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
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.
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.
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?#
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