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

Add more Sample Option Attributes #207

Closed
michael-hawker opened this issue Jul 19, 2022 · 2 comments
Closed

Add more Sample Option Attributes #207

michael-hawker opened this issue Jul 19, 2022 · 2 comments
Labels
dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement Improvement to an existing feature help wanted Extra attention is needed sample app 🖼 source generator ⚙️
Milestone

Comments

@michael-hawker
Copy link
Member

Related #149

Realized as we've been building more samples, that just having bool and multi-choice as our options is a bit limiting, so wanted to list out some other simple scenarios for ToolkitSample*OptionAttributes we may want in the future:

Name Parameters Description
ToolkitSampleCommandOptionAttribute label + nameof(SomeMethodOnSampleClass) Creates a Button with label content which will execute the command when clicked
ToolkitSampleTextOptionAttribute title (as normal) + placeholder Creates a TextBox with placeholder text, allows user to type freeform text
ToolkitSampleSliderOptionAttribute min + max + step + initial Creates a Slider

We may also want a flag for MultiChoice to change whether it's radio buttons or a combobox?

We can always refer to our existing sample methods for ideas.

@michael-hawker
Copy link
Member Author

michael-hawker commented Oct 6, 2022

Also found an issue trying to TwoWay bind to a ToolkitSampleBoolOption value. Uno throws an error in its XAML source generator that it can't find the property.

See a34ec37

@Arlodotexe
Copy link
Member

Also found an issue trying to TwoWay bind to a ToolkitSampleBoolOption value. Uno throws an error in its XAML source generator that it can't find the property.

Thanks, we'll get that fixed up when we move focus back to Labs again.

michael-hawker added a commit that referenced this issue Oct 6, 2022
Note: should be TwoWay bound but issue on Uno, added note here for now: #207 (comment)
michael-hawker added a commit that referenced this issue Oct 13, 2022
* Adding new controls

* Uno fixes

* Added SettingsExpanderSample

* Adding sampleref

* Bugfixes

* CI fix

* Fix CI

* Adding ExpanderV2

* CI fix

* Update Generic.xaml

* Add overrides

* Uno fixes

* CI fix

* Update ExampleSettingsControlsTestClass.cs

* Simplifing state setting

* Revert "Simplifing state setting"

This reverts commit a014377.

* Quick fix to enable building locally to workaround unoplatform/uno#9297

* Update labs/SettingsControls/samples/SettingsControls.Samples/SettingsExpanderSample.xaml

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update labs/SettingsControls/samples/SettingsControls.Samples/SettingsExpanderSample.xaml

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Tweaks

* Renamed ButtonIcon to ActionIcon

* Make SettingsExpander Content a ContentProperty

* File rename

* Making the StyleSelector work

* Add github.com/rudyhuyn/XamlPlus Attached Style Helper

Resolve issue with ToggleSwitch override due to microsoft/microsoft-ui-xaml#7792

* Add binding to Expander option toggle

Note: should be TwoWay bound but issue on Uno, added note here for now: #207 (comment)

* Removing HeaderedContentControl from the template

* XAML styling

* Removed HeaderedContentControl out of the SettingsCard template

* Adding WrapThreshold

* Fix failing test in SettingsCard tests

* Tweaked SettingsCard sample

* XAML styling

* Remove SettingsExpanderItem and use SettingsCard directly

Allows for better interop to just cut/paste SettingsCards in/out of Expanders 🙂

* UI tweaks to samples and SettingsCard to render the correct height

* Adding VSM only

* Temp: Comment out column trigger which was causing control to grow after state change and cause infinite layout cycle

i.e. when the break point was reached (e.g. control size 560), VSM was changing the layout and now control size would be larger again (e.g. 605), which would then turn off trigger and re-layout back to old size which would now be smaller again, etc...

We need to ensure the transition between the Right and Vertical states doesn't increase the width of the control.

* Remove redundant minwidth

* Clean up code, comments

* Code cleanup SettingsCard

* Settings ToolkitSampleRenderer alignment to Stretch

* Bumping version number

* Removing HeaderedContentControl

* Removing remaining reference

* Add triggers

* Update Generic.xaml

* Update Generic.xaml

* Use ThemeResource instead of StaticResource

Co-authored-by: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
michael-hawker added a commit to CommunityToolkit/Tooling-Windows-Submodule that referenced this issue Mar 14, 2023
* Adding new controls

* Uno fixes

* Added SettingsExpanderSample

* Adding sampleref

* Bugfixes

* CI fix

* Fix CI

* Adding ExpanderV2

* CI fix

* Update Generic.xaml

* Add overrides

* Uno fixes

* CI fix

* Update ExampleSettingsControlsTestClass.cs

* Simplifing state setting

* Revert "Simplifing state setting"

This reverts commit a014377730da0672d6e8010e58de0d006b0099ba.

* Quick fix to enable building locally to workaround unoplatform/uno#9297

* Update labs/SettingsControls/samples/SettingsControls.Samples/SettingsExpanderSample.xaml

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update labs/SettingsControls/samples/SettingsControls.Samples/SettingsExpanderSample.xaml

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Tweaks

* Renamed ButtonIcon to ActionIcon

* Make SettingsExpander Content a ContentProperty

* File rename

* Making the StyleSelector work

* Add github.com/rudyhuyn/XamlPlus Attached Style Helper

Resolve issue with ToggleSwitch override due to microsoft/microsoft-ui-xaml#7792

* Add binding to Expander option toggle

Note: should be TwoWay bound but issue on Uno, added note here for now: CommunityToolkit/Labs-Windows#207 (comment)

* Removing HeaderedContentControl from the template

* XAML styling

* Removed HeaderedContentControl out of the SettingsCard template

* Adding WrapThreshold

* Fix failing test in SettingsCard tests

* Tweaked SettingsCard sample

* XAML styling

* Remove SettingsExpanderItem and use SettingsCard directly

Allows for better interop to just cut/paste SettingsCards in/out of Expanders 🙂

* UI tweaks to samples and SettingsCard to render the correct height

* Adding VSM only

* Temp: Comment out column trigger which was causing control to grow after state change and cause infinite layout cycle

i.e. when the break point was reached (e.g. control size 560), VSM was changing the layout and now control size would be larger again (e.g. 605), which would then turn off trigger and re-layout back to old size which would now be smaller again, etc...

We need to ensure the transition between the Right and Vertical states doesn't increase the width of the control.

* Remove redundant minwidth

* Clean up code, comments

* Code cleanup SettingsCard

* Settings ToolkitSampleRenderer alignment to Stretch

* Bumping version number

* Removing HeaderedContentControl

* Removing remaining reference

* Add triggers

* Update Generic.xaml

* Update Generic.xaml

* Use ThemeResource instead of StaticResource

Co-authored-by: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement Improvement to an existing feature help wanted Extra attention is needed sample app 🖼 source generator ⚙️
Projects
None yet
Development

No branches or pull requests

3 participants