-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSoC Ibus Extension Refactor #46
base: main
Are you sure you want to change the base?
GSoC Ibus Extension Refactor #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some formatting issues as something to start with the reviewing process.
In addition to these, the CI is failing for the formatting issues as well, https://github.com/openSUSE/Customize-IBus/actions/runs/10455429747/job/28954579307
I suggest you run the following commands first:
npm i
npm run pre-commit
Then manually fix the issue following npm run lint
}, | ||
"shell-version": [ | ||
"46" | ||
], | ||
"url": "https://github.com/openSUSE/Customize-IBus", | ||
"uuid": "[email protected]", | ||
"version": 89 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to bump the version when we finally want to release the project.
|
||
prefs.fillPrefsWindow(window, UIFolderPath, gettextDomain); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto (new line)
@@ -255,7 +255,7 @@ | |||
<summary>candidate popup box right click function</summary> | |||
</key> | |||
<key type="b" name="use-candidate-still"> | |||
<default>false</default> | |||
<default>true</default> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the default value here BTW?
@@ -10,7 +10,7 @@ | |||
<summary>use custom font</summary> | |||
</key> | |||
<key type="b" name="use-candidate-opacity"> | |||
<default>false</default> | |||
<default>true</default> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the default value here BTW?
</object> | ||
</child> | ||
</object> | ||
</interface> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto (New line)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional issues to note:
- Dialog is broken: e.g. Restore to default
- About page icon is broken (also good to keep the exact line breaks/styling of each section https://github.com/openSUSE/Customize-IBus/blob/main/GUIDE.md#about)
- Improve multilingual support (e.g. Chinese when the system is in Chinese, these should have all been translated)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, is this PR actually a working version? If yes, then this is highly likely to be caused by the version upgrade. We must tackle this so that users who have already installed this plugin can have a smooth upgrade experience.
Currently, I'm waiting for this issue to be fixed before I can further review the PR.
I'll review and fix those issue in this week. |
As GNOME 47 has already entered into RC, I've released v90 to support it https://discourse.gnome.org/t/gnome-47-rc-released/23210. Then let's aim to have this for GNOME 48 instead, which will probably be February next year. |
GSoC Ibus Extension Refactor Final Report
This pull request includes a GSoC project Ibus Extension Refactor final report overview.
Project Goals
The primary goal of this project is to refactor the Customize IBus GNOME extension to ensure its compatibility with the latest GNOME versions release while enhancing its maintainability, extensibility, and user interface. The project aims to achieve the following:
Migrate the Preferences Panel to libadwaita (Adw): Transition the extension's preference panel from vanilla GTK to libadwaita to align with the modern GNOME design guidelines. This will provide a more consistent and intuitive user interface .
Refactor the Codebase for Maintainability and Extensibility: Improve the organization and modularity of the codebase by distributing the core functionalities across well-defined components within the
lib
andui
directories.Clean Up the Codebase and Remove Backward Compatibility: Remove deprecated code and eliminate support for older GNOME Shell versions.
Improve the Input Source Indicator: Address issues with the input source indicator not following the cursor position in certain applications like Google Chrome.
What I Did
During the project, the following tasks were accomplished:
Migrated the Preferences Panel: Successfully migrated the preferences panel from GTK to libadwaita, ensuring it adheres to modern GNOME UI standards. This involved replacing GTK widgets with their libadwaita counterparts, such as
Adw.PreferencesWindow
,Adw.SwitchRow
,Adw.ComboRow
, and others. Note, some child components were remain in Gtk and nested under the Adw components as there are no similar Adw counterparts.Refactored the Interface Codebase: The Prefs.js codebase was refactored for better maintainability by modularizing key components into separate files within the
ui
directories. Most values inPrefs.js
file were rebinded to extension.jsCleaned Up Deprecated Code: Removed backward compatibility code and deprecated functions, aligning the extension with GNOME 45+ guidelines.
Current State
As some values are not finished keybinding yet, and some issues arised during local test, the project is not finished and requires further works and maintenences.
Remaining Work
Besides significant progress has been made, below is a list of what is left to do:
Gtk scales
in genral and indicator page,Gtkbox
in general page, need keybinding.Extension.js
file needs further refactoring.Challenges and Lessons Learned
Throughout the project, I encountered several challenges. The first and most challenge was reading the existing codebase and restructuring the directories. As I was not familiar with these components initially, it took me a considerable amount of time to read the documentation and identify their modern counterparts. Once identified, I needed to integrate them and recode the interface accordingly.
The process of handling keybindings presented a similar challenge. Reading and understanding the backend code to bind the values in the UI files required a great deal of time and patience. Failing to bind values correctly was a common occurrence during this process. However, this experience greatly improved my ability to read and comprehend code. Once I successfully bound one type of value, the remaining tasks became much easier to accomplish.
Another significant challenge for me was time management. Balancing three different projects during the summer was not easy. However, this taught me the importance of effective time management and prioritization in handling multiple responsibilities simultaneously. Luckily my mentor @HollowMan6 is supportive and understanding. I want to express my gratitude for offering the opportunity to participate the project. The patience and willingness to help made a significant difference in my ability to overcome challenges and successfully complete the most part of the project.