Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add plugin slot for login page #31

Conversation

ArturGaspar
Copy link
Member

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
Member 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.

2 participants