This week, I worked on an issue in the AppFlowy project to fix focus borders not appearing on date cells. AppFlowy is a note taking app built using rust and flutter. The issue was that cells which have a type of 'Date' would not have a focus border if they were selected:
Here the second cell has been clicked to change the value but there is no visual change in the cell to indicate this. I had previously contributed to AppFlowy so I thought I would be able to get started right away. However, when I tried to run the app in debug mode, I got a build error:
-Csplit-debuginfo is unstable on this platform. After some investigation, I found that this happens on a newer version (>1.65) of rust. And I had recently updated rust to the latest version. Thus, I downgraded rust to 1.64 was able to run the app locally.
I used the Widget Inspector to find the logic for rending the data cell and thought about how to add the focused border functionality. The date cell opens a popup when it is clicked. I decided to use this existing logic to show a focus border when the popup is shown and remove it when the popup is closed:
Now, the selected cell is highlighted. I tested the popup by trying to change different values, changing field types etc., and confirmed that the border worked on both light and dark themes. Finally, I created a PR for the changes.
Oldest comments (0)