Skip to content
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

[DMP 2024]: GTK4 Exploration #14

Open
10 tasks
walterbender opened this issue Apr 8, 2024 · 28 comments
Open
10 tasks

[DMP 2024]: GTK4 Exploration #14

walterbender opened this issue Apr 8, 2024 · 28 comments
Labels
C4GT Community project for C4GT community

Comments

@walterbender
Copy link
Member

Ticket Contents

Description

Sugar 0.120 runs on GTK3 and needs to be ported to GT4, we need to port Sugar and it's core activities to support GTK4 before GTK3 gets to its EOL.

Project Task Checklist

  • Migrate minimal sugar-toolkit-gtk3 components to support Hello World activity, in particular the activity and graphics classes.
  • Migrate Hello World activity.
  • Document migration strategy based on extending any existing upstream GTK3 to GTK4 porting documentation.
  • Migrate remaining toolkit components.
  • Extend Hello World to use remaining toolkit components, and rename as a Toolkit Test activity,
  • Migrate Sugar.
  • Migrate the Fructose activity set, as time permits.

Steps to start

Goals & Mid-Point Milestone

Goals

  • [Plan migration]
  • [Set up a dev env.]
  • [Migrate sugar-toolkit-gtk3]
  • [Migrate Hello World to GTK4]
  • [Goals Achieved By Mid-point Milestone]
  • [Plan migration]
  • [Set up a dev env.]

Out of scope

  • [Migrate more toolkit components]
  • [Migrate Sugar]
  • [Migrate Fructose Activities]

Setup/Installation

No response

Expected Outcome

A first pass at the GTK4 version of the toolkit and a Hello World activity

Acceptance Criteria

  • Solid initial plan
  • First pass at toolkit
  • Hello World activity
  • Documentation
  • Plan for next steps

Implementation Details

See GTK4 migrating

See docs on sugar-toolkit-gtk3

Mockups/Wireframes

No response

Product Name

Sugar Toolkit GTK4

Organisation Name

Sugar Labs

Domain

⁠Education

Tech Skills Needed

Debugging, Python, UI/UX/Design

Mentor(s)

@i

Category

API, Refactoring, Research, Testing

@oneshikaa
Copy link

Hey @walterbender
I wanted to learn about the project and its installation . Could you please suggest me some resources ?

@chimosky
Copy link
Member

The sugar-docs contain really helpful info.

@AbhimanyuSamagra
Copy link

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries. Here's a Video Tutorial on how to submit a proposal for a project.

@krishij03
Copy link

krishij03 commented Apr 23, 2024

Hey @chimosky @walterbender , any contributor to the project yet? Also wanted a suggestion, should I setup "Packaged Sugar" or "Sugar Live Build" from https://github.com/sugarlabs/sugar/blob/master/docs/development-environment.md#sugar-live-build ? I've currently setup the live build to understand and learn about the platform.

@walterbender
Copy link
Member Author

@krishij03 We've not begun GTK4 porting yet. How to kick-start the process with this project.

Sugar Live Build is a good choice for dev. But note that it will not have any GTK4 components.

@krishij03
Copy link

@walterbender Understood, I was wondering how I could test and debug my code written in GTK 4. Is there any way you could suggest I create a minimal GTK 4 activity? It would obviously require me to first port the activity and graphics classes to GTK 4, but how can I run the build so that I can debug my code then?

@inkerton
Copy link

inkerton commented Apr 24, 2024

hello sir @walterbender , I am interested in working on this project. i have already made myself familiar with the sugar labs live build and the specific features. i want to know how do i test my created file to check if it is behaving like in gtk4 environment. I am having trouble while testing the code.

@chimosky
Copy link
Member

chimosky commented Apr 24, 2024

@walterbender Understood, I was wondering how I could test and debug my code written in GTK 4. Is there any way you could suggest I create a minimal GTK 4 activity? It would obviously require me to first port the activity and graphics classes to GTK 4, but how can I run the build so that I can debug my code then?

Right now you can't create a minimal GTK4 activity because sugar-toolkit-gtk3 doesn't have support for GTK4 which is what the project idea is about, you can test porting the Hello world activity to GTK4 after much of the toolkit has been ported and you can fix any bugs that come up while testing.

The sugar-live-build can be downloaded and installed in a vm, where you can build and test the core sugar modules, a restart of Sugar is needed to see changes.

Hope this helps!

@chimosky
Copy link
Member

hello sir @walterbender , I am interested in working on this project. i have already made myself familiar with the sugar labs live build and the specific features. i want to know how do i test my created file to check if it is behaving like in gtk4 environment. I am having trouble while testing the code.

What files are you referring to?

If it's sugar-toolkit-gtk3, then you can build and install the toolkit - instructions are in the live-build repo I provided above -.

@krishij03
Copy link

Hey @chimosky yes I figured that out yesterday, tested the hello world activity as well, I understand that the entire toolkit would have to be ported to GTK4 to make the new GTK4 hello world activity work. I was just wondering if I could test it in an isolated sort of environment. But that's something I'm gonna have to try myself, to port only necessary stuff from the graphics and activities files and test the hello world activity that way. Anyway, thank you so much for your help!

@chimosky
Copy link
Member

Hey @chimosky yes I figured that out yesterday, tested the hello world activity as well, I understand that the entire toolkit would have to be ported to GTK4 to make the new GTK4 hello world activity work. I was just wondering if I could test it in an isolated sort of environment. But that's something I'm gonna have to try myself, to port only necessary stuff from the graphics and activities files and test the hello world activity that way. Anyway, thank you so much for your help!

As Walter suggested above, the sugar-live-build is the best environment to test with - you can install it in a vm -, you might not need to port the toolkit fully to test, you can port some parts - you can start with the sugar3.activity.activity.Activity class , only testing that part with GTK4.

What graphics and activities files are you referring to?

@krishij03
Copy link

Hey @chimosky yes I figured that out yesterday, tested the hello world activity as well, I understand that the entire toolkit would have to be ported to GTK4 to make the new GTK4 hello world activity work. I was just wondering if I could test it in an isolated sort of environment. But that's something I'm gonna have to try myself, to port only necessary stuff from the graphics and activities files and test the hello world activity that way. Anyway, thank you so much for your help!

As Walter suggested above, the sugar-live-build is the best environment to test with - you can install it in a vm -, you might not need to port the toolkit fully to test, you can port some parts - you can start with the sugar3.activity.activity.Activity class , only testing that part with GTK4.

What graphics and activities files are you referring to?

yes I was referring to exactly changing the sugar3.activity.activity.Activity class and also classes like sugar3.graphics.window.Window and sugar3.graphics.alert.Alert if required.

@krishij03
Copy link

you might not need to port the toolkit fully to test, you can port some parts - you can start with the sugar3.activity.activity.Activity class , only testing that part with GTK4.

my apologies for a dumb question @chimosky but like you mentioned above, how can I make the changes to that class in a way where I can test the new hello world activity in gtk4?

@quozl
Copy link

quozl commented Apr 25, 2024

That's exactly the point of the exploration. If we knew, or if we had done it, we would not be asking. 😁

@krishij03
Copy link

krishij03 commented Apr 26, 2024

Yeah thought as much @quozl , my apologies. 😭
I'll start drafting a proposal based on the migration.
Is there anything that you guys suggest I must include in it? @walterbender @chimosky

@chimosky
Copy link
Member

you might not need to port the toolkit fully to test, you can port some parts - you can start with the sugar3.activity.activity.Activity class , only testing that part with GTK4.

my apologies for a dumb question @chimosky but like you mentioned above, how can I make the changes to that class in a way where I can test the new hello world activity in gtk4?

You can make the changes to those files by opening them and making changes, then build with your changes, Sugar activities use that class so starting the Hello world activity is you testing your changes.

Yeah thought as much @quozl , my apologies. 😭
I'll start drafting a proposal based on the migration.
Is there anything that you guys suggest I must include in it? @walterbender @chimosky

I'll suggest you try to understand how the Hello world activity is written and how it uses sugar-toolkit-gtk3, and then learn how the parts of the toolkit it uses are implemented in the toolkit.

@SashithaThummagunta
Copy link

hi @chimosky
can i know hoe to begin the project?

@krishij03
Copy link

@chimosky Thanks! I'm trying to migrate the necessary classes. I've mostly figured out where the changes need to be made so far for the Hello World Activity, I'll try my best to prepare a short migration example and mention that in the proposal.

@chimosky
Copy link
Member

hi @chimosky can i know hoe to begin the project?

You could go through the comments above as we've probably answered some questions you might have.

@Cephasgokula
Copy link

Cephasgokula commented May 3, 2024

Hi @walterbender , i am interested to work on the ui/ux part of the project. can you assign it to me.

@vaibhav-sangwan
Copy link
Contributor

vaibhav-sangwan commented May 5, 2024

Hello @walterbender, @chimosky, does there exist any documentation related to migration for when sugar-toolkit was ported from GTK2 to GTK3?

@chimosky
Copy link
Member

chimosky commented May 6, 2024

Hello @walterbender, @chimosky, does there exist any documentation related to migration for when sugar-toolkit was ported from GTK2 to GTK3?

The porting guide in our documentation provides, IIRC sugar-toolkit-gtk3 was written independently of sugar-toolkit. @quozl can correct me if I'm wrong.

@quozl
Copy link

quozl commented May 7, 2024

Sorry, you're wrong. sugar-toolkit was used as the basis for sugar-toolkit-gtk3, and still has a common commit history. So the changes to migrate to GTK3 can be seen. Is helpful only as a guide though, as the changes caused by GTK4 will be mostly unlike the changes caused by GTK3. If I were doing the port to GTK4, I would simply start with sugar-toolkit-gtk3 and begin changing it to depend on GTK4, iterating over each failure until complete.

@quozl
Copy link

quozl commented May 7, 2024

Also, both are Python modules, with both Python and C code embedded. People who want to try this should have a combination of Sugar activity development, Python, GObject introspection, GTK3, GTK4, Python extensions, C language, GNU make and autotools skills. The list can be extended with each import. A person with the right skills for this task would be very very skilled in any Sugar activity development task, because activity development depends critically on the toolkit.

@walterbender walterbender added C4GT Community project for C4GT community and removed DMP 2024 labels Jun 5, 2024
Copy link

Hi!
Mandatory Details - The following details essential to submit tickets to C4GT Community Program are missing. Please add them!

  • Complexity - Please mention the complexity only as High/Medium/Low

Without these details, the ticket cannot be listed on the C4GT Community Listing.

Important Details - These following details are helpful for contributors to effectively identify and contribute to tickets.

  • Sub-Category - Please mention the sub-category if any for the ticket

Please update the ticket

@chimosky
Copy link
Member

chimosky commented Jun 5, 2024

Closing as this isn't part of DMP.

@chimosky chimosky closed this as completed Jun 5, 2024
@walterbender
Copy link
Member Author

@chimosky we didn't select this for DMP but we are considering offering it up as part of C4GT community -- although it needs addition work above and beyond "complexity" and "sub-category" issues raised earlier. We need to break down the problem a bit -- probably into multiple issues -- in order to get some traction.

@walterbender walterbender reopened this Jun 5, 2024
@chimosky
Copy link
Member

chimosky commented Jun 5, 2024

@chimosky we didn't select this for DMP but we are considering offering it up as part of C4GT community -- although it needs addition work above and beyond "complexity" and "sub-category" issues raised earlier. We need to break down the problem a bit -- probably into multiple issues -- in order to get some traction.

Alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C4GT Community project for C4GT community
Projects
None yet
Development

No branches or pull requests

10 participants