Skip to content

Conversation

@ArturGaspar
Copy link

Backport of openedx#1354 to Redwood.

Description

This change adds a plugin slot for the login page allowing it to be customised.

Since there was a dependency conflict between frontend-plugin-framework and the react-hooks testing package, the react-hooks testing package has been removed and a replaced with a simple mechanism for testing hooks.

Since this touched the Login Page those have also been refactored to move away from redux connect.

Supporting information

openedx#1354

Testing instructions

  1. Use env.config.jsx below.

    import { PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
    
    
    const config = {
        pluginSlots: {
            login_page_slot: {
                keepDefault: true,
                plugins: [
                    {
                        op: PLUGIN_OPERATIONS.Wrap,
                        widgetId: 'default_contents',
                        wrapper: ({ component }) => {
                            return (
                                <div>
                                    <span>Hello world</span>
                                    {component}
                                </div>
                            );
                        },
                    },
                ],
            },
        },
    };
    
    export default config;
    
  2. See "Hello world" text before login form

Deadline

None

Other information

Private-ref: https://tasks.opencraft.com/browse/BB-7742

This change adds a plugin slot for the login page allowing it to be customised.

Since there was a dependency conflict between frontend-plugin-framework and the react-hooks testing package, the react-hooks testing package has been removed and a replaced with a simple mechanism for testing hooks.

Since this touched the Login Page those have also been refactored to move away from redux connect.
@ArturGaspar
Copy link
Author

Not necessary yet.

@ArturGaspar ArturGaspar closed this Dec 9, 2024
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