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

A proposal of some bug fixes / new features #13

Open
Phaengris opened this issue Jan 15, 2023 · 6 comments
Open

A proposal of some bug fixes / new features #13

Phaengris opened this issue Jan 15, 2023 · 6 comments

Comments

@Phaengris
Copy link
Contributor

Phaengris commented Jan 15, 2023

Hello Andy!

a) Having the intention to create some desktop apps
b) being a Ruby developer, decided to use Ruby for that (because why not)

I found Glimmer and gladly started to use it for my projects. In the end I've ended up creating a small Glimmer based MVVM framework which I intend to develop further in the process of creating more apps which I have in mind.

My question is - would you be interested if I PR some of my patches into Glimmer? In particular I hope you might be interested in these ones https://github.com/Phaengris/Glimte/tree/main/lib/glimmer

  • complete implementation of TreeView (currently Glimmer Tk has only a list implementation)
  • some useful utils like center_within_root, modal, raise_event, some extensions for the on handler, visible / hidden, enabled / disabled properties, also fixes of some Glimmer bugs
  • couple useful aliases for Shine

Please let me know if some of these features could be useful for Glimmer. I'd gladly create corresponding PRs. If you want only some of them, or want them modified, I'm open to discuss and provide any feedback ;)

@AndyObtiva
Copy link
Owner

Hi,

Thank you for sharing with me the story of how you discovered Glimmer and why you built your own framework on top of it.

Regarding your question:

My question is - would you be interested if I PR some of my patches into Glimmer? In particular I hope you might be interested in these ones https://github.com/Phaengris/Glimte/tree/main/lib/glimmer

  • complete implementation of TreeView (currently Glimmer Tk has only a list implementation)
  • some useful utils like center_within_root, modal, raise_event, some extensions for the on handler, visible / hidden, enabled / disabled properties, also fixes of some Glimmer bugs
  • couple useful aliases for Shine
    Please let me know if some of these features could be useful for Glimmer. I'd gladly create corresponding PRs. If you want only some of them, or want them modified, I'm open to discuss and provide any feedback ;)

The answer is definitely yes!

Here are the items I would be interested in merging into the main Glimmer DSL for Tk project:

  • Complete implementation of TreeView
  • These utils (only): center_within_root, modal, visible / hidden, enabled / disabled
  • Fixes of some Glimmer bugs

Concerning this item:

couple useful aliases for Shine

I have a question. Do you have examples to share of how you use these Shine converter aliases?

My understanding from the implementation code is that they can be used as per the code examples below, but I wanted to confirm my understanding in case you knew of a nicer alternative Ruby syntax for using them without having to add quotes.

somewidget {
  someproperty <=> [somemodel, :someattribute, '<=': -> (val) { val.to_s }]
}

instead of this:

somewidget {
  someproperty <=> [somemodel, :someattribute, on_read: -> (val) { val.to_s }]
}

and

somewidget {
  someproperty <=> [somemodel, :someattribute, '=>': -> (val) { val.to_i }]
}

instead of this:

somewidget {
  someproperty <=> [somemodel, :someattribute, on_write: -> (val) { val.to_i }]
}

Is that correct or do you have better examples for them with nicer syntax without using quotes?

I could consider merging the Shine converter aliases, but that would be something to merge to the parent project, Glimmer, instead of Glimmer DSL for Tk. Also, that way, all Glimmer GUI projects would inherit that feature if it proved useful enough to merge into the parent project.

In any case, thanks again, and I look forward to your patches (as GitHub Pull Requests).

@Phaengris
Copy link
Contributor Author

About aliases - yes, that's my idea exactly :) it came to my mind that '<=' and '=>' could give a bit better readability, especially because of Shine uses same notation.

But that's just an idea :) and unfortunately I also didn't find any possibility to get rid of quotes :(

There are some usage examples
https://github.com/Phaengris/PasswordStore/blob/main/app/views/main_window.glimmer.rb#L34

I'm working on PRs, will send them as soon as I can :)

@AndyObtiva
Copy link
Owner

OK, you can submit a PR for the Shine converter aliases too, but this one would be against the parent Glimmer project:
https://github.com/AndyObtiva/glimmer

@Phaengris
Copy link
Contributor Author

Well, the first PR is ready for your critique :) #14

The second one (TreeView) is on the go.

@Phaengris
Copy link
Contributor Author

Sorry for it took really long time :(

The PR for treeview support #15

@Phaengris
Copy link
Contributor Author

A bug fix for radio buttons #16

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

No branches or pull requests

2 participants