6733 Commits

Author SHA1 Message Date
Luke Towers
03b4effab2 Merge branch 'develop' into wip/child-theme
* develop:
  Use the Storm File model's getLocalRootPath() implementation
2022-11-16 03:00:16 -06:00
Luke Towers
605c2eaa7f Use the Storm File model's getLocalRootPath() implementation
This override is no longer required as of c62ee79d7d
2022-11-16 02:55:17 -06:00
Luke Towers
94d4e197b0 Merge branch 'develop' into wip/child-theme
* develop:
  Prevent fancy layout styling from spilling over into nested forms (#763)
  Allow Snowboard event listeners to be closures
  CMS Twig extension `contentFunction()` should return bool like `partialFunction()` (#746)
  prevent previous relations from being unlinked (#765)
  Allow cms.restrictBaseDir to be controlled via env variable
2022-11-15 10:41:09 -06:00
Ben Thomson
f0a442b4f1
Prevent fancy layout styling from spilling over into nested forms (#763)
Fixes #758.

The edits made to the fancylayout.less should more directly target just the root elements of the UI, and not spill over into nested forms.

Test case in the Test plugin: wintercms/wn-test-plugin@eaebfae
Accessible in the Pages section.
2022-11-15 10:39:06 -06:00
Ben Thomson
692d856ece Allow Snowboard event listeners to be closures 2022-11-15 17:00:46 +08:00
Luke Towers
8cf656d3be Improve performance of active theme resolution, add type hinting
This builds on the work originally done in https://github.com/octobercms/october/pull/3220 to further improve performance, especially in cases where lots of themes are present to choose from or "virtual" themes are being utilized.

Previously every single request would iterate over and initialize every single theme which involved booting an autodatasource for each theme and loading the entire contents of the path cache for each datasource of each theme into memory.

This commit changes the logic so that the cms.theme.getActiveTheme event will be run first, falling back to asking the cache service, then falling back to the DB if present, and finally defaulting to the value set in the configuration. After it has resolved an active theme it will attempt to cache that resolution permanently which should be fine since changing the active theme in the DB would trigger a cache invalidation when done through the setActiveTheme() method and changing the active theme in the file configuration would trigger a cache invalidation as well.
2022-11-15 00:36:07 -06:00
Marc Jauvin
baea29b142
CMS Twig extension contentFunction() should return bool like partialFunction() (#746)
This allows people to use the `content` function as a conditional to add fallback content if a given content file does not exist.
2022-11-14 13:47:56 +08:00
Marc Jauvin
9a13e6a53a
prevent previous relations from being unlinked (#765) 2022-11-11 14:44:26 -06:00
Ben Thomson
48e26fedad Allow cms.restrictBaseDir to be controlled via env variable 2022-11-11 09:42:57 +08:00
Luke Towers
2523b40767 Merge branch 'develop' into wip/child-theme
* develop:
  Pass element's maxlength to slugify and toCamel to respect field definition (#762)
2022-11-09 11:27:39 -06:00
Robert Alexa
aa78d658a6
Pass element's maxlength to slugify and toCamel to respect field definition (#762) 2022-11-09 11:26:35 -06:00
Luke Towers
fa35ede647 Merge branch 'develop' into wip/child-theme
* develop:
  Allow Snowboard debugging to be controlled independently
  Show required indicators on checkbox fields (#754)
  Allow component assets to be mirrored by "winter:mirror" command
2022-11-08 20:26:12 -06:00
Ben Thomson
8f2d2c7f53 Allow Snowboard debugging to be controlled independently
Adds the "develop.debugSnowboard" config option to enable to disable Snowboard debugging, overriding the default behaviour in following the app debug mode.
2022-11-09 09:59:07 +08:00
Jack Wilkinson
cdd9c6a433
Show required indicators on checkbox fields (#754) 2022-11-06 10:54:07 +08:00
Ben Thomson
d5923bddfd
Allow component assets to be mirrored by "winter:mirror" command 2022-11-04 15:15:41 +08:00
Jack Wilkinson
8ecf401a48 Moved backend localzation into theme activation to allow support for loading on theme activation instead of during service provider registration 2022-11-03 15:51:05 +00:00
Jack Wilkinson
f3efa93c64 Merge branch 'develop' into wip/child-theme 2022-10-28 16:04:49 +01:00
Jack Wilkinson
5617dbd338
Added fix to prevent path duplication (#745) 2022-10-28 09:02:34 -06:00
Luke Towers
8a64b1ed48
Include parent theme in twig caching path 2022-10-26 15:40:56 -06:00
QuangTrọngOnline
7f1109fdce
Fix return type for onLoadMovePopup (#744) 2022-10-26 13:34:16 -06:00
Luke Towers
6673c15cbf Merge branch 'develop' into wip/child-theme
* develop:
  Fix base path for FrameworkNode
2022-10-26 10:58:55 -06:00
Luke Towers
41cfc8df8f
Fix base path for FrameworkNode 2022-10-26 10:57:57 -06:00
Luke Towers
9dae8513d1 Merge branch 'develop' into wip/child-theme
* develop:
  Add missing import
2022-10-26 10:46:04 -06:00
Luke Towers
435179061f
Add missing import 2022-10-26 10:45:37 -06:00
Luke Towers
ef7a0b7353 Merge branch 'develop' into wip/child-theme
* develop:
  Switch from using Request::getBasePath() to Url::asset() (#742)
2022-10-26 10:29:30 -06:00
Jack Wilkinson
6b07509e7c
Switch from using Request::getBasePath() to Url::asset() (#742) 2022-10-26 10:28:48 -06:00
Luke Towers
fa822ba13c
Merge pull request #732 from wintercms/wip/child-themes-luke
Child Theme Improvements
2022-10-26 10:25:44 -06:00
Luke Towers
7fd94b0081
Merge branch 'wip/child-theme' into wip/child-themes-luke 2022-10-26 10:25:11 -06:00
Luke Towers
b79c58f80d Merge branch 'develop' into wip/child-theme
* develop:
  Set pivot data when initially syncing the relationship (#739)
  Added CLI signature to mix:list command
  Fix Navigation Manager unit test
  Update jobs tables to support Laravel 9 (#730)
  Add migrate to list of protected commands (#733)
  Add "Send password reset email" button to backend users update page (#723)
  Adjust descriptor for local event
  Change event doc to test new event functionality in Docs plugin
  Removed NPX from webpack bin call (#728)
  Add test case for getParentData method in AJAX framework
  Recompile Snowboard
  Allow for custom AJAX error responses to be passed through handlers
  Allow detached AJAX request to be called with 2 params
  Improve IDE knowledge of the PluginBase object
  Fix support for data-request-parent
2022-10-26 10:20:24 -06:00
Luke Towers
3dccee54c7
Coding style fix 2022-10-26 02:29:38 -06:00
Luke Towers
2b140f449c
Improve databaseLayerEnabled() check 2022-10-26 02:28:35 -06:00
Luke Towers
5cee4bfcb7 Merge branch 'develop' into wip/child-themes-luke
* develop:
  Set pivot data when initially syncing the relationship (#739)
  Added CLI signature to mix:list command
  Fix Navigation Manager unit test
2022-10-26 01:28:41 -06:00
Luke Towers
e9739361bb
Set pivot data when initially syncing the relationship (#739)
Also performs the sync with model instances rather than just raw IDs to support relationships with a custom relatedKey set (the key on the related model's table that is stored on the pivot table to connect the relationship, normally just the primary key but can be anything).
2022-10-26 01:24:52 -06:00
Luke Towers
dd479281cd
Added CLI signature to mix:list command 2022-10-26 01:00:38 -06:00
Ben Thomson
98c78bdbf1 Fix Navigation Manager unit test
The Singleton changes introduced to Storm (ca5959495b) that bind singletons to the app means that in unit tests, we will need to re-initialise any scope we need for tests, as the app is cleared upon each test case being run.
2022-10-25 17:33:14 +08:00
Luke Towers
83420ebc9b Merge commit '966edea734a0e330f19ebe2547a1332ed39cb907' into wip/child-themes-luke
* commit '966edea734a0e330f19ebe2547a1332ed39cb907':
  Set pivot data when initially syncing the relationship
  Update jobs tables to support Laravel 9 (#730)
  Add migrate to list of protected commands (#733)
  Add "Send password reset email" button to backend users update page (#723)
  Adjust descriptor for local event
  Change event doc to test new event functionality in Docs plugin
  Removed NPX from webpack bin call (#728)
  Add test case for getParentData method in AJAX framework
  Recompile Snowboard
  Allow for custom AJAX error responses to be passed through handlers
  Allow detached AJAX request to be called with 2 params
  Improve IDE knowledge of the PluginBase object
  Fix support for data-request-parent
2022-10-24 14:55:46 -06:00
Luke Towers
966edea734
Set pivot data when initially syncing the relationship
Also performs the sync with model instances rather than just raw IDs to support relationships with a custom relatedKey set (the key on the related model's table that is stored on the pivot table to connect the relationship, normally just the primary key but can be anything).
2022-10-24 12:10:13 -06:00
Eric Pfeiffer
dc70c90d3b
Update jobs tables to support Laravel 9 (#730)
Updates `failed_jobs` table to add missing `uuid` column. This also updates the `payload` and `exception` columns to be inline with the default Laravel migration.
2022-10-19 23:01:16 -06:00
Luke Towers
a52b466e8e
Add migrate to list of protected commands (#733)
Prevents issues with unelevated plugins that expect the database to exist always.
2022-10-19 18:10:49 -06:00
Jack Wilkinson
222b60b29b
Added file detection allowing per file based theme overrides 2022-10-19 09:42:49 +01:00
Luke Towers
0a9f21d4bf
Avoid Twig cache conflicts when running multiple themes
Related: a18e3ed112
2022-10-18 22:20:47 -06:00
Luke Towers
a18e3ed112
Remove unintentional debugging statement 2022-10-18 22:17:11 -06:00
Luke Towers
527fa69a6e
Avoid cache conflicts when running multiple themes
Instead of using 4 characters split across two folders for avoiding cache conflicts just use the relative path to the file directly. Also makes it easier to find files in the cache when debugging
2022-10-18 22:16:40 -06:00
Luke Towers
991717a96f
Add initial support for child themes referencing combined assets in parent themes 2022-10-18 21:45:43 -06:00
Suhas P R
2fc9997542
Add "Send password reset email" button to backend users update page (#723) 2022-10-13 03:35:23 -06:00
Ben Thomson
c6a2fe557c Adjust descriptor for local event 2022-10-11 10:03:31 +08:00
Ben Thomson
90b360348a Change event doc to test new event functionality in Docs plugin 2022-10-11 09:41:13 +08:00
Luke Towers
4a71c759a2
Support child themes referencing their parent theme's localization strings 2022-10-10 16:12:28 -06:00
Jack Wilkinson
1bb81ac889 Switched order of execution 2022-10-07 17:17:54 +01:00
Jack Wilkinson
4b7b864a73
Removed NPX from webpack bin call (#728) 2022-10-07 10:03:57 -06:00