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

[RFC] Issue #9104 Provide dialog widgets #9111

Closed
wants to merge 64 commits into from

Conversation

yybalam
Copy link

@yybalam yybalam commented Jul 23, 2016

This PR try to provide to qooxdoo a default basic dialog widgets. Basically this PR add :

  1. A Message dialog for alert messaged.
  2. A Confirm dialog with support for attach function to buttons.
  3. A BusyIndicator.

A qx.ui.Dialog static class provide a short way for launch dialogs.:

qx.ui.Dialog.alert("Yay, some dialog!");
qx.ui.Dialog.error("Some was wrong. :(");

Also this PR include an MBusyBlocker mixin. This mixin extend MBlocker for provide an loading gif while the widget is blocked. Also is possible to show a custom text if allowBusyPopup is set to true.

Right now there is only two test, one for Message and another for Confirm.

Whats missing?

Well, some documentation of course. Also I thing a test for MBusyBlocker, but I don found a test for MBlocker so I'm not sure how to test it.

Also when I compile using 'Tango' icon theme, the icons are shown, but I can't get it work for Oxygen.

I know this PR actually is not complete (sorry) to be merge, but maybe heps to get the way.

Cheers.

Yeshua Rodas added 30 commits July 8, 2016 18:06
Call to 'encodeURI' and 'decodeURI' instead of 'escape' and 'unescape' deprecated functions.
This dialog provide for a window with title, message, also an ok and cancel buttons.
Also is possible to asign a custom function for ok button.
…custop funcctions and aspects (icons and labels).
Now the constructor is more simple. Now expext an optional array as third argument,
this array can be so simple as an array of string with the names of supported buttons, or
a object mapping the icon, label, callback and context, all of this optional.

The inner logic for compose buttons also become more simpler.
Added a new `_applyContext` method for change the context globally for callbacks.
…e call to setter methods of properties, like `setCallback()`.
@yybalam
Copy link
Author

yybalam commented Aug 3, 2016

Hello.

Here is a live demo: http://yybalam.net/qxlab/dialoglab/
Here is the code of the demo: https://gitlab.com/yybalam/dialoglab/tree/master

So, I will to write the docs for manual and examples to demobrower, also add support for the rest of themes and the squashing of my lot of commits (at moment I don't know how to do this last one, need to study 😅)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 55.693% when pulling 36caac8 on yybalam:dialoglab into 121f145 on qooxdoo:master.

@woprandi
Copy link
Contributor

woprandi commented Aug 5, 2016

@yybalam you can check how to squash commits here : https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits

@oetiker
Copy link
Member

oetiker commented Aug 5, 2016

looking at the demo ... like the optics ... I wonder about the placement of the buttons ... I would have expected them to be right aligned.

Yeshua Rodas added 10 commits August 8, 2016 13:46
Added a mixin that provide of a widget blocker with busy indicators suppoert.

Added a new abstract class for build dialog windows and Message and Confirm implementations.
This dialog windows support themable icon's, a caption and a message.
The Confirm implementation also support custom function for callbacks.
This dialog provide for a window with title, message, also an ok and cancel buttons.
Also is possible to asign a custom function for ok button.

Added support for icon to Abstract dialog class.
Implemented factory method for build button.

Added support to locale for labels.
Added support for title translations.
Added support for dialog titles translations at spanish.
Refactored for implement construction of internal widgets by child control approach.

Added test for Message class, also this test checks for Abstract dialog class factory methods.

Improved test method's names. Now are more explicit about what test.
Added test for Confirm dialog. Test all the ways of construction, also test the proper context for handlers.

Removed static assets for Oxygen icons.
Updated tests for implement calls to «getChildControl()».
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 55.72% when pulling 3697049 on yybalam:dialoglab into 121f145 on qooxdoo:master.

@@ -62,7 +62,7 @@ qx.Bootstrap.define("qx.bom.Cookie",
end = document.cookie.length;
}

return decodeURI(document.cookie.substring(len, end));
return unescape(document.cookie.substring(len, end));
},
Copy link
Member

@oetiker oetiker Aug 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ? unescape is deprecated ... is this a rebase problem ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. That is fixed by another PR that is no merged yet, so I think this PR must avoid that change, so this PR don't break anything with actual sate of master. 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this is a revert to your own patch series ... you definitely need to squash these bevor we can merge ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll try to do it right in my next try. Squash is absolutely something new for me. 😅

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 55.731% when pulling b9d47fd on yybalam:dialoglab into 121f145 on qooxdoo:master.

Since indigo is an extension of simple they share elements.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 55.691% when pulling f4939a1 on yybalam:dialoglab into 121f145 on qooxdoo:master.

@zaucker
Copy link
Member

zaucker commented Aug 31, 2016

Are the block and busy variants styled differently than the other dialogs on purpose in the demo? Title and min/max/close buttons on block/busy (extending qx.ui.window.Window() and not on the others (probably extending Popup)?

@yybalam
Copy link
Author

yybalam commented Aug 31, 2016

Yeah. The idea behind bolck and busy is a mixin (MBusyBlocker) for any widget, so do not have any special style, is just for block a Widget and shown a centred gif or popup with a tiny gif and a label. I just used Windows for convenience in the demo.

@zaucker
Copy link
Member

zaucker commented Aug 31, 2016

Thanks for the explanation, sounds good.

On Wed, 31 Aug 2016, Yeye Balam wrote:

Yeah. The idea behind bolck and busy is a mixin (MBusyBlocker) for any
widget, so do not have any special style, is just for block a Widget and
shown a centred gif or popup with a tiny gif and a label. I just used
Windows for convenience in the demo.

Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker +41 62 775 9900 (switch board)
Aarweg 15 +41 79 675 0630 (mobile)
CH-4600 Olten fax: +41 62 775 9905
Schweiz web: www.oetiker.ch

@level420 level420 added the enhancement New features, give me a PR!!! label Dec 2, 2016
@cboulanger
Copy link
Contributor

Hello @yybalam, still interested in contributing a widget set to qooxdoo for the 6.0 release? This would require that you update the PR to the current master and address the remaining issues raised in the discussion. You could also contribute your widget set as a "contrib", which would require to change the top-level namespace. It would be great to have two different dialog widget sets as contribs, so people have a choice... If you're interested, let me know.

@yybalam
Copy link
Author

yybalam commented Sep 7, 2017

@cboulanger Oh, yeah. I'm still interesed in contributing the widget. But instead of update this PR, can I close this PR and create a new one?

@cboulanger
Copy link
Contributor

@yybalam Sure!

@level420
Copy link
Member

level420 commented Dec 6, 2017

As @yybalam suggested: closing this PR.

@level420 level420 closed this Dec 6, 2017
@cboulanger
Copy link
Contributor

@yybalam please consider creating a contrib based on a child controls. It would be great to have stylable dialogs, I don't think I will have the time to ever work on my own Dialog widget and add styleability. Publishing the contrib will be really easy with the new qx contrib CLI commands which I hope to finish soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, give me a PR!!!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants