Skip to content

Replace ObjectModel references in SUI#7970

Merged
16 commits merged intofeature/settings-uifrom
dev/lelian/sui-without-objectmodel
Oct 21, 2020
Merged

Replace ObjectModel references in SUI#7970
16 commits merged intofeature/settings-uifrom
dev/lelian/sui-without-objectmodel

Conversation

@leonMSFT
Copy link
Contributor

@leonMSFT leonMSFT commented Oct 19, 2020

This PR's main goal was to get rid of all our ObjectModel references and replace them with references to TSM.

There's a lot of places in the SUI where I wasn't able to easily drop in the TSM. Usually those settings types aren't as simple as a boolean, so they'll require some templating and finessing. For those settings, I've either commented them out for now or attempted to replace them. Here's a TLDR of what I've done in this PR.

  • Since MainPage is the entry point, it gets a CascadiaSettings object to hold on to, and that's the settings object the rest of the pages will bind to.
  • Deleted everything inside of ObjectModel along with their references.
  • Replaced the ObjectModel references in the .xaml files with a reference to the settings object obtained in MainPage
  • Commented out a couple of settings here and there that might need converters and/or templating.
  • Attempted to write out most of the templating and data binding code for ColorSchemes.xaml

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

If what cz and I chatted about is correct -- carlos, back me up here! -- you can probably undo all the observability changes!

// this section will clone the active AppSettings
_settingsSource = AppSettings();
_settingsClone = _settingsSource.Clone();
MainPage::_settingsSource = settings;
Copy link
Member

Choose a reason for hiding this comment

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

be real careful with static things.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks!

@leonMSFT leonMSFT added the AutoMerge Marked for automatic merge by the bot when requirements are met label Oct 21, 2020
@ghost
Copy link

ghost commented Oct 21, 2020

Hello @leonMSFT!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit b0b5fc1 into feature/settings-ui Oct 21, 2020
@ghost ghost deleted the dev/lelian/sui-without-objectmodel branch October 21, 2020 20:08
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoMerge Marked for automatic merge by the bot when requirements are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants