Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
a75fe75
Create main.yml
k-deeley Jun 28, 2023
8158335
Update main.yml
k-deeley Jun 28, 2023
c00d1ed
Update main.yml
k-deeley Jun 28, 2023
c7a0723
Update main.yml
k-deeley Jun 28, 2023
e09b3b1
Added tags for incompatibility with headless mode, and updated the te…
k-deeley Jun 28, 2023
9186017
Updated main.yml - specified headless mode to the test runner
k-deeley Jun 28, 2023
4bba9ce
Fixed bug in test runner
k-deeley Jun 28, 2023
2b45a9c
Merge commit '9186017e1018eca656d77d599397a3c2c73d8009' into k-deeley…
k-deeley Jun 28, 2023
d5c242d
Updated test tags to exclude more tests that fail in headless mode
k-deeley Jun 29, 2023
af7f6f5
Added list of MATLAB versions to the CI pipeline
k-deeley Jun 29, 2023
2f78a69
Windows testing is only supported from R2021a onwards
k-deeley Jun 29, 2023
dfc993c
Fixed shared container test bug with error ID that has changed betwee…
k-deeley Jun 29, 2023
b694ea3
Fixed R2022a test bugs in tBoxPanel and tScrollingPanel.
k-deeley Jun 29, 2023
20319fd
Trying tests on ubuntu-latest
k-deeley Jun 29, 2023
c1c97c4
Trying tests on macos-latest
k-deeley Jun 29, 2023
0f19475
Reverting YML file back to windows-latest and MATLAB versions from R2…
k-deeley Jun 29, 2023
1f7a0a1
Trivial change to test workflow run
k-deeley Jul 17, 2023
219400e
Update main.yml
k-deeley Aug 18, 2023
328a34f
Update main.yml
k-deeley Aug 18, 2023
38f2366
Update main.yml
k-deeley Aug 18, 2023
d01ec6d
Updated YAML file to include webui tests and virtual desktop
k-deeley Jan 5, 2024
d43b49d
Try running on ubuntu-latest only
k-deeley Jan 5, 2024
92be503
Checking in 23b if the crash still appears
k-deeley Jan 5, 2024
9f179e0
Trying without -webui on 23b
k-deeley Jan 5, 2024
e398a9e
tBoxPanel debugging
k-deeley Jan 8, 2024
27aa45e
Trying non-Java tests on Ubuntu
k-deeley Jan 8, 2024
83b9ab1
Testing with tTabPanel
k-deeley Jan 8, 2024
ce26430
Testing with tExamples
k-deeley Jan 8, 2024
68a26e7
Updated tExamples
k-deeley Jan 8, 2024
74e4433
Updated tExamples
k-deeley Jan 8, 2024
f09f653
Updated YML to test on Windows, Linux, and Mac
k-deeley Jan 8, 2024
fbdec1d
Updated YML
k-deeley Jan 8, 2024
d475e62
Updated YML
k-deeley Jan 8, 2024
f1e9076
Updated YML
k-deeley Jan 8, 2024
90bab30
Checking tab panel tests
k-deeley Jan 8, 2024
00cd3e1
Fixed bugs in the examples and small issue in TabPanel (parent backgr…
k-deeley Jan 8, 2024
1960aa3
Running tests on Windows
k-deeley Jan 8, 2024
69791f8
Excluded ATF tests
k-deeley Jan 8, 2024
8b17201
Testing panel on Mac
k-deeley Jan 8, 2024
a1e69c5
Panel on windows
k-deeley Jan 8, 2024
8f17eb8
Trying monospaced font
k-deeley Jan 8, 2024
1764b55
Debugging on MAC
k-deeley Jan 8, 2024
81aecdc
MAC debugging
k-deeley Jan 8, 2024
e9c4838
Fixed string-->char
k-deeley Jan 8, 2024
f724dd2
Debugging on MAC
k-deeley Jan 8, 2024
f357a0c
Reproducing gesture failures
k-deeley Jan 8, 2024
0d716ad
Trying Java tests on Windows
k-deeley Jan 8, 2024
8c7736d
Trying Java & flex tests on Ubuntu with virtual desktop
k-deeley Jan 8, 2024
d416c30
Flex and Java tests on MAC
k-deeley Jan 8, 2024
b6232b9
Flex/Java tests on Mac
k-deeley Jan 8, 2024
5003809
Ubuntu with ATF and virtual desktop
k-deeley Jan 8, 2024
0e537d5
Debugging on Mac
k-deeley Jan 8, 2024
846c597
Added MACOS
k-deeley Jan 8, 2024
d555aa1
Trying panel tests on Mac
k-deeley Jan 8, 2024
27ead05
Added try/catch in SharedContainerTests
k-deeley Jan 8, 2024
9289a33
Adjusted points to pixels
k-deeley Jan 8, 2024
85cd893
Swapped FontUnits and FontSize so that units are set first
k-deeley Jan 8, 2024
0185e22
Batch run on Linux
k-deeley Jan 8, 2024
d659e2d
Trying v2-beta on Linux
k-deeley Jan 8, 2024
ea76125
Updated YML
k-deeley Jan 8, 2024
e674d6d
Updated job strategy
k-deeley Jan 8, 2024
f8120ef
Updated YML
k-deeley Jan 8, 2024
f806cb3
Updated YAML file
k-deeley Jan 8, 2024
f4464fd
Updated YAML file
k-deeley Jan 9, 2024
ed2816e
Updated YAML file
k-deeley Jan 9, 2024
5abbd50
Limited YAML
k-deeley Jan 9, 2024
3a066af
Updated YAML
k-deeley Jan 9, 2024
5b9a9b9
Updated YAML
k-deeley Jan 9, 2024
6e75f66
Updated YAML
k-deeley Jan 9, 2024
0bc2c96
Updated YAML file
k-deeley Jan 9, 2024
f98ec6c
Updated YAML
k-deeley Jan 9, 2024
f8c2482
Updated YAML
k-deeley Jan 9, 2024
eca9d52
Updated YAML
k-deeley Jan 9, 2024
e5f4cbc
Updated YAML
k-deeley Jan 9, 2024
4c16a90
Updated YAML
k-deeley Jan 9, 2024
7d456fe
Trying all tests excluding Java and flex
k-deeley Jan 9, 2024
8f8baae
Replaced testrunner for compatibility with R2020b
k-deeley Jan 9, 2024
bd233e9
Updated test runner
k-deeley Jan 9, 2024
438217f
Updated YAML
k-deeley Jan 9, 2024
5f9d21a
Updated YAML
k-deeley Jan 9, 2024
fb8a926
Check tExamples on 20b Linux
k-deeley Jan 9, 2024
fc20678
Fixed tExamples for compatibility with R2020b
k-deeley Jan 9, 2024
ac7bde1
Updated YAML
k-deeley Jan 9, 2024
5960706
Updated YAML
k-deeley Jan 9, 2024
f5432d5
Updated YAML
k-deeley Jan 9, 2024
3e94383
Fixed a bug in gesturetests
k-deeley Jan 9, 2024
70bd4d6
Checking if datacursormode issue on -webui on Mac is a timing issue
k-deeley Jan 10, 2024
e3a86e6
Run mouse & Java tests on Windows, 23b, desktop and webui
k-deeley Jan 10, 2024
10a574e
Trying to fix timing issue with mouse pointers on Windows
k-deeley Jan 10, 2024
4660131
Increased pause duration in flex test
k-deeley Jan 10, 2024
560099d
Updated pause duration to 1 second
k-deeley Jan 10, 2024
6fa97bb
Added test code to SharedFlexTests
k-deeley Jan 10, 2024
06b334b
Filtered some mouse pointer tests to only run in the JSD
k-deeley Jan 10, 2024
889e120
Running tests on all MATLAB versions on Windows
k-deeley Jan 10, 2024
a9dc41d
Filtered tests before 23b
k-deeley Jan 10, 2024
d5a53e8
Filtering mouse/Java tests before 23b in CI
k-deeley Jan 10, 2024
5f830f9
Trying all tests in Linux
k-deeley Jan 10, 2024
3525743
Trying tests on all platforms
k-deeley Jan 10, 2024
4bcc58b
Check to see if code refactor solves Seg-V issue on Mac
k-deeley Jan 10, 2024
2b30565
Full batch run, expecting Seg-Vs on Mac but otherwise passing tests
k-deeley Jan 10, 2024
f88ad41
Batch job, all tests, expecting failures on Mac from R2022a onwards d…
k-deeley Jan 10, 2024
d230532
Typo in YAML file, trying batch job again
k-deeley Jan 10, 2024
c74d236
Rewritten datacursor test
k-deeley Jan 11, 2024
61f6bdd
Adjusted datacursormode test
k-deeley Jan 11, 2024
985b792
Skipping datacursormode tests in CI
k-deeley Jan 11, 2024
5dd843a
Adding string support for TabPanel
k-deeley Jan 11, 2024
f11c9e7
Updated YAML file to include R2024a.
k-deeley May 30, 2024
30634d6
Updated actions to use v2
k-deeley May 30, 2024
b729e18
Excluded Mac tests
k-deeley May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/glt-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: GUI Layout Toolbox Continuous Integration

# Controls when the workflow will run.
on:

# Triggers the workflow on push or pull request events, but only for the master branch.
push:
branches: [ master ]
pull_request:
branches: [ master ]

# This allows the workflow run to be run manually from the Actions tab in GitHub.
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:

# Run the GUI Layout Toolbox tests.
run-GLT-tests:

# Define the job strategy.
strategy:

# Set up the job strategy matrix to define the different job configurations.
matrix:

# List of platforms on which to run the tests.
platform: [ ubuntu-latest, windows-latest ]

# List of MATLAB releases over which to run the tests.
matlab-version: [ R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a ]

# We don't define any startup options until we reach R2023b (handled separately below).
matlab-startup-options: [ '' ]

# Windows/Mac are supported from R2021a onwards. Ubuntu is supported from R2020b onwards.
# Exclude the Windows job on R2020b.
exclude:

- platform: windows-latest
matlab-version: R2020b
matlab-startup-options: [ '' ]

# The tests should also be run in the JavaScript Desktop from R2023b onwards (this is the -webui startup option).
include:

- platform: ubuntu-latest
matlab-version: R2023b
matlab-startup-options: -webui

- platform: windows-latest
matlab-version: R2023b
matlab-startup-options: -webui

- platform: ubuntu-latest
matlab-version: R2024a
matlab-startup-options: -webui

- platform: windows-latest
matlab-version: R2024a
matlab-startup-options: -webui

# Specify the platform that the job will run on.
runs-on: ${{ matrix.platform }}

# Don't fail the entire run if one job fails.
continue-on-error: true

# Steps define a sequence of tasks to be executed as part of the job.
steps:

# Check out the repository under $GITHUB_WORKSPACE, so that the job can access it.
- name: Check out the repository
uses: actions/checkout@v4

# For Linux jobs, start a display server on the runner.
- name: Start a display server for jobs running on Linux.
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV

# Set up MATLAB on the runner.
- name: Set up MATLAB on the runner.
uses: matlab-actions/setup-matlab@v2
with:
# The tests require only base MATLAB.
products: MATLAB
release: ${{ matrix.matlab-version }}

# Run the GUI Layout Toolbox tests.
- name: Run the GUI Layout Toolbox tests.
uses: matlab-actions/run-command@v2
with:
startup-options: ${{ matrix.matlab-startup-options }}
command: openProject("project.prj"); results = runToolboxTests(); failedTests = table(results([results.Failed])); disp(failedTests); results.assertSuccess();
14 changes: 0 additions & 14 deletions docsrc/Examples/TEST_REQUIREMENTS.xml

This file was deleted.

8 changes: 6 additions & 2 deletions docsrc/Examples/callbackexample.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function callbackexample()
function varargout = callbackexample()

% Copyright 2009-2020 The MathWorks, Inc.

Expand Down Expand Up @@ -37,11 +37,15 @@ function callbackexample()
% Add user interactions
set( hList, 'Callback', @onChangeColor );

% Return output.
if nargout > 0
nargoutchk( 1, 1 )
varargout{1} = f;
end % if

function onChangeColor( source, ~ )
idx = get( source, 'Value' );
set( hButton, 'Background', colorValues(idx,:), 'String', colorNames{idx} )
end % onChangeColor


end % main
8 changes: 7 additions & 1 deletion docsrc/Examples/demoBrowser.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function demoBrowser()
function varargout = demoBrowser()
%demoBrowser: an example of using layouts to build a user interface
%
% demoBrowser() opens a simple GUI that allows several of MATLAB's
Expand All @@ -25,6 +25,12 @@ function demoBrowser()
% Explicitly call the demo display so that it gets included if we deploy
displayEndOfDemoMessage('')

% Return output.
if nargout > 0
nargoutchk( 1, 1 )
varargout{1} = gui.Window;
end % if

%-------------------------------------------------------------------------%
function data = createData()
% Create the shared data-structure for this application
Expand Down
8 changes: 7 additions & 1 deletion docsrc/Examples/dockexample.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function dockexample()
function varargout = dockexample()
%DOCKEXAMPLE: An example of using the panelbox dock/undock functionality

% Copyright 2009-2020 The MathWorks, Inc.
Expand Down Expand Up @@ -30,6 +30,12 @@ function dockexample()
set( panel{2}, 'DockFcn', {@nDock, 2} );
set( panel{3}, 'DockFcn', {@nDock, 3} );

% Return output.
if nargout > 0
nargoutchk( 1, 1 )
varargout{1} = fig;
end % if

%-------------------------------------------------------------------------%
function nDock( eventSource, eventData, whichpanel ) %#ok<INUSL>
% Set the flag
Expand Down
10 changes: 8 additions & 2 deletions docsrc/Examples/minimizeexample.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function minimizeexample()
function varargout = minimizeexample()
%MINIMIZEEXAMPLE: An example of using the panelbox minimize/maximize

% Copyright 2009-2020 The MathWorks, Inc.
Expand Down Expand Up @@ -33,6 +33,12 @@ function minimizeexample()
set( panel{2}, 'MinimizeFcn', {@nMinimize, 2} );
set( panel{3}, 'MinimizeFcn', {@nMinimize, 3} );

% Return output.
if nargout > 0
nargoutchk( 1, 1 )
varargout{1} = fig;
end % if

%-------------------------------------------------------------------------%
function nMinimize( eventSource, eventData, whichpanel ) %#ok<INUSL>
% A panel has been maximized/minimized
Expand All @@ -45,7 +51,7 @@ function nMinimize( eventSource, eventData, whichpanel ) %#ok<INUSL>
s(whichpanel) = pheightmax;
end
set( box, 'Heights', s );

% Resize the figure, keeping the top stationary
delta_height = pos(1,4) - sum( box.Heights );
set( fig, 'Position', pos(1,:) + [0 delta_height 0 -delta_height] );
Expand Down
2 changes: 2 additions & 0 deletions resources/project/Root.type.Files/.github.type.File.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
45 changes: 39 additions & 6 deletions tbx/layout/+uix/TabPanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
FontName % font name
FontSize % font size
FontWeight % font weight
FontUnits % font weight
FontUnits % font units
ForegroundColor % tab text color [RGB]
HighlightColor % border highlight color [RGB]
ShadowColor % border shadow color [RGB]
Expand Down Expand Up @@ -120,6 +120,10 @@
end % get.FontAngle

function set.FontAngle( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = convertStringsToChars( value );
end % if

% Check
assert( ischar( value ) && any( strcmp( value, {'normal','italic','oblique'} ) ), ...
Expand Down Expand Up @@ -150,6 +154,10 @@
end % get.FontName

function set.FontName( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = convertStringsToChars( value );
end % if

% Check
assert( ischar( value ) && any( strcmp( value, obj.FontNames ) ), ...
Expand Down Expand Up @@ -212,6 +220,10 @@
end % get.FontWeight

function set.FontWeight( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = convertStringsToChars( value );
end % if

% Check
assert( ischar( value ) && any( strcmp( value, {'normal','bold'} ) ), ...
Expand Down Expand Up @@ -242,6 +254,10 @@
end % get.FontUnits

function set.FontUnits( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = convertStringsToChars( value );
end % if

% Check
assert( ischar( value ) && ...
Expand Down Expand Up @@ -400,6 +416,10 @@
end % get.TabEnables

function set.TabEnables( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = cellstr( convertStringsToChars( value ) );
end % if

% For those who can't tell a column from a row...
if isrow( value )
Expand All @@ -415,7 +435,7 @@
isequal( size( value ), size( tabs ) ) && ...
all( strcmp( value, 'on' ) | strcmp( value, 'off' ) ), ...
'uix:InvalidPropertyValue', ...
'Property ''TabEnables'' should be a cell array of strings ''on'' or ''off'', one per tab.' )
'Property ''TabEnables'' should be a cell array of character vectors ''on'' or ''off'', or an array of strings, one per tab.' ) %#ok<ISCLSTR>

% Set
tf = strcmp( value, 'on' );
Expand All @@ -440,6 +460,10 @@
end % get.TabLocation

function set.TabLocation( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = convertStringsToChars( value );
end % if

% Check
assert( ischar( value ) && ...
Expand All @@ -462,6 +486,10 @@
end % get.TabTitles

function set.TabTitles( obj, value )

if ~verLessThan( 'matlab', '9.3' )
value = cellstr( convertStringsToChars( value ) );
end % if

% For those who can't tell a column from a row...
if isrow( value )
Expand All @@ -475,7 +503,7 @@
assert( iscellstr( value ) && ...
isequal( size( value ), size( tabs ) ), ...
'uix:InvalidPropertyValue', ...
'Property ''TabTitles'' should be a cell array of strings, one per tab.' )
'Property ''TabTitles'' should be a cell array of character vectors or an array of strings, one per tab.' ) %#ok<ISCLSTR>

% Set
n = numel( tabs );
Expand Down Expand Up @@ -863,9 +891,14 @@ function onParentChanged( obj, ~, ~ )
end

if ~isempty( prop )
obj.ParentBackgroundColorListener = event.proplistener( obj.Parent, ...
findprop( obj.Parent, prop ), 'PostSet', ...
@( src, evt ) obj.updateParentBackgroundColor( prop ) );
foundProp = findprop( obj.Parent, prop );
if foundProp.SetObservable
obj.ParentBackgroundColorListener = event.proplistener( obj.Parent, ...
foundProp, 'PostSet', ...
@( src, evt ) obj.updateParentBackgroundColor( prop ) );
else
obj.ParentBackgroundColorListener = [];
end % if
else
obj.ParentBackgroundColorListener = [];
end
Expand Down
14 changes: 0 additions & 14 deletions tbx/layoutdoc/Examples/TEST_REQUIREMENTS.xml

This file was deleted.

Loading