Skip to content

Conversation

@brianjhanson
Copy link
Contributor

Targeting the refactor-t-function branch just for a cleaner diff.

Moves the main settings page into inertia. The main change here is setting up at least a first pass of our icon library to use with the craft-icon component (which is just a wrapper around wa-icon).

Warning

I updated where assets are published which may break things for you.

Previously we published the resources/build folder to public/vendor/craft but now that we're also publishing icons, those have been moved to public/vendor/craft/build. Icons will end up in public/vendor/craft/icons.

I know at least @riasvdv and I have symlinks set up that links public/vendor/craft to resources/build. With this PR you'll need to update that. In my case I just symlinked the entire resources directory.

# From your Craft site (DDEV project)
cd public/vendor && ln -s ../../vendor/craftcms/cms/resources craft

@brianjhanson brianjhanson marked this pull request as draft December 17, 2025 20:17
Comment on lines 105 to 113
// @TODO ask Rias for help with this
// // Fire a 'registerCpSettings' event
// $eventName = $readOnly ? self::EVENT_REGISTER_READ_ONLY_CP_SETTINGS : self::EVENT_REGISTER_CP_SETTINGS;
// if ($this->hasEventHandlers($eventName)) {
// $event = new RegisterCpSettingsEvent(['settings' => $settings]);
// $this->trigger($eventName, $event);
//
// return $event->settings;
// }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@riasvdv Can you remind me how I should be implementing events so both Yii and Laravel events work properly? Or maybe just point me towards an example?

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Create new events RegisterReadonlyCpSettings and RegisterCpSettings

  2. Dispatch the new events

  3. Add a static registerEvents() to the legacy class that used to dispatch them, where it listens for the new event and dispatches that in the Yii way.

  4. Add a call to that static method in the service provider of the adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants