Skip to content

Commit 6a209b5

Browse files
authored
Merge pull request #1319 from medha-14/week-9
Week 9: Improving Tree UI from Review Feedback and Migration Guide
2 parents 6852abf + 5c99d20 commit 6a209b5

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Week 9: Improving Tree UI from Review Feedback and Migration Guide
2+
====================================================================
3+
4+
.. post:: July 27, 2026
5+
:author: Medha Bhardwaj
6+
:tags: google
7+
:category: gsoc
8+
9+
This week, I focused on improving the Tree UI component based on detailed mentor feedback, and authored a comprehensive migration guide for users transitioning from FURY 0.12.x to v2.0.0.
10+
11+
Overview
12+
--------
13+
14+
This week, I worked on the following:
15+
16+
- Improving the Tree UI component based on review feedback (`#1283 <https://github.com/fury-gl/fury/pull/1283>`_)
17+
- Writing the FURY 0.12.x → v2.0.0 migration guide (`#1302 <https://github.com/fury-gl/fury/pull/1302>`_)
18+
19+
Tree UI Improvements
20+
---------------------
21+
22+
**Before Improvements:**
23+
24+
.. image:: https://github.com/user-attachments/assets/82ab994b-ecfe-4498-8de9-90cbe6709816
25+
:align: center
26+
:alt: Tree UI Component (Before)
27+
28+
After submitting the initial Tree UI implementation, I received a thorough code review from my mentor. The feedback covered both functional improvements and architectural concerns. Here is a summary of the key feedback items I worked on:
29+
30+
- **Collapse/expand button positioning**: The default button position collided with other elements and was not visible until the ``TreeNode`` was activated. I fixed the layout so buttons are properly positioned and visible by default.
31+
- **Using ``TexturedButton2D`` over ``ImageContainer2D``**: The review suggested using ``TexturedButton2D`` instead of ``ImageContainer2D`` for interactive icons, as it provides proper button semantics and toggle mode support out of the box.
32+
- **Customizable button position**: The expand/collapse button should be positionable at either the start or end of the node. I made this configurable, defaulting to the start position with plus/minus icons to resemble a standard file tree.
33+
- **Toggle mode for expand/collapse**: Instead of manually swapping icon states, I leveraged the existing toggle mode in our button components to handle the expanded/collapsed visual state.
34+
- **Scroll wheel support on TreeNodes**: Previously, only the scrollbar itself responded to scroll events. I added wheel event listeners to the ``TreeNode`` and background panel so users can scroll by hovering anywhere over the tree, matching the behavior already established in ``ListBox`` and ``ComboBox``.
35+
- **Scrollbar abstraction**: The review pointed out that the scrollbar implementation is duplicated across ``ListBox``, ``ComboBox``, and now ``Tree2D``. I explored the feasibility of abstracting it into a shared component.
36+
- **Richer example scene**: The example was expanded to include all available UI elements — sliders, buttons, ``ComboBox``, and more — turning the tree into a comprehensive showcase of every UI component in FURY.
37+
- **ListBox rendering fix**: A rendering issue in ``ListBox`` was identified during review, and I investigated and addressed it.
38+
39+
**After Improvements:**
40+
41+
.. image:: https://github.com/user-attachments/assets/66608574-5501-4fd7-8a3a-51bb0fa3942b
42+
:align: center
43+
:alt: Tree UI Component (After)
44+
45+
Migration Guide: FURY 0.12.x → v2.0.0
46+
---------------------------------------
47+
48+
I also authored a comprehensive migration guide documenting all user-level API changes between FURY 0.12.x and v2.0.0. The guide covers 18 major areas of change, including:
49+
50+
- **Rendering backend switch** from VTK to PyGfx/WGPU, with code examples showing how to migrate direct VTK calls.
51+
- **Color API normalization**, including auto-conversion of 0 to 255 integer colors and hex string support.
52+
- **Actor module restructuring**, documenting the new sub-module layout (``core.py``, ``curved.py``, ``planar.py``, etc.).
53+
- **New per-actor transform API** with ``rotate()``, ``translate()``, and ``scale()`` methods directly on actor objects.
54+
- **Window and ShowManager changes**, including the new multi-screen layout, callback system, and ImGui integration.
55+
- **UI sub-system rebuild**, listing all currently available components and those still pending migration.
56+
- **Removed APIs**, providing a clear table of modules and symbols that no longer exist in v2.0.0.
57+
58+
A few nuances that came up while writing the migration guide:
59+
60+
- **Angle units changed**: The old ``euler_matrix`` function used radians, while the new ``actor.rotate()`` uses degrees. This is a subtle breaking change that could easily be missed.
61+
- **Background API change**: ``scene.background()`` was a method call in 0.12.x but is now a settable property (``scene.background = (r, g, b, a)``), and it accepts RGBA rather than just RGB.
62+
- **Legacy backward-compatibility code explicitly removed**: The old UI system had compatibility shims that were deliberately stripped out, meaning old UI code will fail immediately rather than degrade gracefully.
63+
64+
What I Learned
65+
--------------
66+
67+
This week reinforced the importance of thorough code review in improving component quality. The mentor feedback on the Tree UI pushed me to think about reusability (scrollbar abstraction), proper component composition (using ``TexturedButton2D`` with toggle mode instead of manual state management), and user experience details (scroll-anywhere behavior). Writing the migration guide also deepened my understanding of the entire FURY architecture and the scale of changes involved in the VTK to PyGfx transition.
68+
69+
In the upcoming week, I plan to:
70+
---------------------------------
71+
72+
- Continue addressing review comments on the Tree UI PR.
73+
- Work on fury website SEO and image optimization.
74+
Connect with Me
75+
---------------
76+
77+
- GitHub: `medha-14 <https://github.com/medha-14>`_
78+
- LinkedIn: `Medha Bhardwaj <https://www.linkedin.com/in/medhabhardwaj/>`_

0 commit comments

Comments
 (0)