From 002a0270f0d7324109dcbe4eeec11fd0a1698a1b Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 2 Dec 2024 16:34:43 +0700 Subject: [PATCH 1/3] Move UpdateResourceItemDataSource method to base DataSourceItem Class --- src/Reveal.Sdk.Dom/Data/DataSourceItem.cs | 8 ++++++++ .../Data/DataSourceItems/RestDataSourceItem.cs | 9 --------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs b/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs index 50e7678c..e078bf2e 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs @@ -253,5 +253,13 @@ private string ValidateRightFieldName(string fieldName, string alias) throw new ArgumentException($"Invalid right field name format: {fieldName}"); } + + protected void UpdateResourceItemDataSource(DataSource dataSource) + { + ResourceItemDataSource.Id = dataSource.Id; + ResourceItemDataSource.Title = dataSource.Title ?? ResourceItem.Title; + ResourceItemDataSource.Subtitle = dataSource.Subtitle ?? ResourceItem.Subtitle; + ResourceItem.DataSourceId = ResourceItemDataSource.Id; + } } } diff --git a/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs b/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs index 028cedee..f1855c93 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs @@ -105,15 +105,6 @@ protected override void OnFieldsPropertyChanged(List fields) Parameters.Add("config", BuildConfig(fields)); } - //todo: this may need to go on the base class. wait until more data source items are created - private void UpdateResourceItemDataSource(DataSource dataSource) - { - ResourceItemDataSource.Id = dataSource.Id; - ResourceItemDataSource.Title = dataSource.Title ?? ResourceItem.Title; - ResourceItemDataSource.Subtitle = dataSource.Subtitle ?? ResourceItem.Subtitle; - ResourceItem.DataSourceId = ResourceItemDataSource.Id; - } - private Dictionary BuildConfig(IEnumerable fields) { Dictionary config = new Dictionary(); From 3c2b0e4a957d17285888b14e1a730d7cec89bd34 Mon Sep 17 00:00:00 2001 From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:02:55 -0700 Subject: [PATCH 2/3] fixed sandbox layout --- e2e/Sandbox/MainWindow.xaml | 57 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/e2e/Sandbox/MainWindow.xaml b/e2e/Sandbox/MainWindow.xaml index 9b51ff7b..3ea01ade 100644 --- a/e2e/Sandbox/MainWindow.xaml +++ b/e2e/Sandbox/MainWindow.xaml @@ -1,27 +1,30 @@ - - - - - - - - - - + + + + + + - +