RFC: Add decorative elements in the sidebar to distinguish between directory, functions, and classes #92
Replies: 3 comments
-
@luochen1990 sorry for the late reply. Both suggestions from you are good and we use a combination of them. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I've been a bit busy lately, but this is done. But I've only implemented Solution 1, and you can preview this change using the dev branch. The use of Solution 1 alongside Solution 2 may need further discussion, and because of the icons, displaying something like Indeed, Funix's modification of from funix.config.switch import GlobalSwitchOption
GlobalSwitchOption.AUTO_CONVERT_UNDERSCORE_TO_SPACE_IN_NAME = False The above code will turn off Funix's automatic underscore conversion. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Yazawazi |
Beta Was this translation helpful? Give feedback.
-
If there is a function a_b_c, currently it is displayed in the sidebar as "a b c", I can understand the purpose of this design, which is to make everything look more like a page rather than a debugging interface.
But I think people may have different scenarios for using Funix,
One scenario is that people write some functions and then casually use funix to provide a visual interface without wanting to do any additional work, including fine-tuning its style.
2. Another scenario is that people specifically write functions decorated with @funix for the purpose of using them as user interfaces, even if these functions may not necessarily have any significant practical functionality.
In the first case, I would focus more on the correspondence between the interface and the code, that is, knowing which part of the interface corresponds to where in the code. At such times, I actually hope for a more distinct differentiation between directories, functions, and classes.
In the second scenario, users can fully control more behaviors of the widgets using parameters within the @funix decorator, including subtle adjustments to the style.
Therefore, considering all aspects, I believe it would be a good idea to add a category-distinguishing icon (or simply some additional characters) to all elements by default.
Candidate Solution One:
Add an icon before the names of directories, functions, and classes;
Candidate Solution 2:
Add a
/
symbol after the directory name, i.e., directory a will be displayed asa/
, add()
brackets after the function, i.e., function f will be displayed asf()
, and classes will be displayed directly by their names.Beta Was this translation helpful? Give feedback.
All reactions