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

[Feature Request]: Implementation of MessageDialog #1376

Open
PWagner1 opened this issue Mar 22, 2024 · 13 comments
Open

[Feature Request]: Implementation of MessageDialog #1376

PWagner1 opened this issue Mar 22, 2024 · 13 comments
Assignees
Labels
area:toolkit All issues related to the toolkit components. enhancement New feature or request new feature A new feature has been requested. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. under investigation This bug/issue is currently under investigation. version:100 All things to do with V100.
Milestone

Comments

@PWagner1
Copy link
Contributor

PWagner1 commented Mar 22, 2024

Taken from #1148 by @giduac

If I seen it correct then there's also an effort to incorporate a timer next to the checkbox. It might be a tall order to get all that working without creating breaking changes.

How about a sort of MessageDialog like in UWP that can be instantiated, configured and then shown.

Also the DialogResult enum remains intact and prevents confusion about all the additional values in there since DialogResult is not only used by KMessageBox

For example:

MessageDialog dlg = new();
dlg.Checked = false;
dlg.CheckboxText = "Did you donate to Krypton Suite this year?";
DialogResult res = dlg.ShowDialog();

if ( res == DialogResult.OK && dlg.Checked ) {
   . . .
}

In that instantiated dialog you can embed all kinds of nifty stuff like timers / hyperlinks / scrollable text / etc. and as soon as the user closes it you can examine the dialog properties for the choices the user made.

@PWagner1 PWagner1 added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. area:toolkit All issues related to the toolkit components. labels Mar 22, 2024
@PWagner1
Copy link
Contributor Author

PWagner1 commented Mar 23, 2024

@Smurf-IV I think this might be what we need https://github.com/JohannBlais/InformationBox/tree/master

image

@giduac
Copy link
Contributor

giduac commented Mar 29, 2024

@Wagnerp & @Smurf-IV & @tobitege

Maybe another solution to this MessageDialog.

The original KMessageBox is factually only a static wrapper for KryptonMessageBoxForm class. Which is the underlying component that displays the KMB.

A copy of KryptonMessageBoxForm could be the start for this dialog approach. Then wrap it in an instantiable class and expose the properties like suggested earlier.

Factually KryptonMessageBoxForm already does all the basic stuff needed, is already Kryptonized and from there can be extended with other options.

@Smurf-IV
Copy link
Member

Smurf-IV commented Mar 31, 2024

@Wagnerp @tobitege @giduac
Actions for v90

Actions for v100

  • Add KryptonMessageDialog that has fields that can be set "Before" the show is called
  • Add Existing V90 chekcbox etc functionality to KMD
  • Update Breaking change doc to state to to use KMD
  • Update / Fix Examples to use KMD (restore KMB example)
  • Add new functionality to replicate more of the "InformationBox" Example(s)
  • Expandable/collapsible footer, see examples such as JIT
  • Other functionality

thoughts ?

@Smurf-IV Smurf-IV added regression Something was working in a previous release, but isn't working now. awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. labels Mar 31, 2024
@giduac
Copy link
Contributor

giduac commented Mar 31, 2024

@Wagnerp @tobitege @Smurf-IV Actions for v90

  • Take KMB back to the Winform override (Remove Checkbox etc)
  • Update docs to state restore and breaking changes
  • Add KryptonMessageDialog that has fields that can be set "Before" the show is called
  • Add Existing V90 chekcbox etc functionality to KMD
  • Update Breaking change doc to state to to use KMD
  • Update / Fix Examples to use KMD (restore KMB example)
  • Add new functionality to replicate more of the "InformationBox" Example(s)
  • Other functionality

thoughts ?

This dialog can become a handy control for all kinds of tasks.

Ideas to add to the list:

  • Discuss and make a good plan before construction starts, maybe some kind of roadmap
  • Start with a good base that easily and in a standard manner can be altered (add or remove controls/functionality)
  • Rollback KMBox functionality when KMDialog becomes operational as the replacement for extended functionality. Use a transition period so devs can migrate to KMDialog.

@tobitege
Copy link

I appreciate the points you laid out, Smurf, and also concur with @giduac above.

Having 2 distinct components - even though causing breaking changes - looks easier to maintain in the mid- to long-term for both the maintainers and the users.
Admittedly, thus far I've mostly relied on a MessageBox-like behavior that is easy-to-use with little code for distinct purposes, like Confirmation, Yes/No or Error and always try to find a method where I don't have to provide 10 parameters each time.

Having methods to encapsule above "types" as "ease of use" drop-ins, I guess, could help many users.

A roadmap, as @giduac mentions, certainly would provide transparency and helps managing expectations for the reasons given.

@PWagner1
Copy link
Contributor Author

@Smurf-IV, @giduac & @tobitege

The first item on the list has already been done last week.

@Smurf-IV
Copy link
Member

Having 2 distinct components - even though causing breaking changes - looks easier to maintain in the mid- to long-term for both the maintainers and the users.

Agreed, I think I will Perform Step 1, BUT Keep the existing KMB and rename it as KMBDep to allow interim for the

Use a transition period so devs can migrate to KMDialog.

And then mention that in the "Breaking Changes"
I do not want to rename it to KMDialog as the functionality API params will be different.

@Smurf-IV
Copy link
Member

KMDialog can then start as a separate entity in Ext kit first (to get all the controls etc sorted And RTL), Then can be moved into Suite once done.

Smurf-IV added a commit that referenced this issue May 6, 2024
- Fix Layout of Single line of MessageBox Text
- Fix usage of MessageBox Icons when System type selected
- Fix detection of Windows Version(s)
- Apply Brackets style

#1376
@giduac
Copy link
Contributor

giduac commented Jun 13, 2024

@Wagnerp,

Please assign to me.
Thanks.

@PWagner1 PWagner1 added under investigation This bug/issue is currently under investigation. and removed awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. labels Jun 13, 2024
@PWagner1 PWagner1 added this to the Version 90 milestone Jun 13, 2024
@PWagner1
Copy link
Contributor Author

@giduac Done

@Smurf-IV
Copy link
Member

Smurf-IV commented Jul 4, 2024

@Wagnerp @tobitege @giduac Actions for v90

* [x]  [[Other Issues]: Copy `KryptonMessageBox` to `KryptonMessageBoxDep` #1432](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1432)

* [x]  [[Other Issues]: Take KMB back to the Winform override (Remove Checkbox etc) #1435](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1435)

* [x]  Update docs to state restore and breaking changes

* [ ]  Add `KryptonMessageDialog` that has fields that can be set "Before" the show is called

* [ ]  Add Existing V90 chekcbox etc functionality to `KMD`

* [ ]  Update Breaking change doc to state to to use KMD

* [ ]  Update / Fix Examples to use KMD (restore KMB example)

* [ ]  Add new functionality to replicate more of the "InformationBox" Example(s)

* [ ]  Other functionality

I think the "Not completed Actions" should be scheduled for V100

@giduac
Copy link
Contributor

giduac commented Jul 4, 2024

@Wagnerp

Yes please tag it V100

@giduac
Copy link
Contributor

giduac commented Oct 26, 2024

I think we need to have a good look the already existing TaskDialog. That control does a lot of what has been described here. Maybe it's easier to adapt TaskDialog to this, instead of adding another control...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:toolkit All issues related to the toolkit components. enhancement New feature or request new feature A new feature has been requested. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. under investigation This bug/issue is currently under investigation. version:100 All things to do with V100.
Projects
None yet
Development

No branches or pull requests

4 participants