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

TOC Plugin Container #4255

Closed
Tracked by #9982
allyoucanmap opened this issue Sep 25, 2019 · 1 comment
Closed
Tracked by #9982

TOC Plugin Container #4255

allyoucanmap opened this issue Sep 25, 2019 · 1 comment

Comments

@allyoucanmap
Copy link
Contributor

Description

Currently the TOC interacts with different plugins and sometimes they are directly hardcoded in the component.
This could cause some configuration issues:
eg: #2759
The aim of this proposal is to improve the TOC by adding a way to add buttons and panels from other plugin.

here a first implementation:
4c6aa29

use case:
Style Editor Plugin

function TOCButtonComponent({ status, enabled, onToggle, ...props }) {
    return !enabled && status === 'LAYER'
    ? <Button {...props} onClick={() => onToggle()}>
        <Glyphicon glyph="dropper" />
    </Button>
    : null;
}

const TOCButton = connect(
    createSelector([ enabledSelector ], (enabled) => ({ enabled })),
    { onToggle: enablePluginAction }
)(TOCButtonComponent);

export default createPlugin('StyleEditor', {
    component: StyleEditorPlugin,
    containers: {
        TOC: {
            priority: 1,
            tool: TOCButton, // component connected to the state
            panel: true // shows the plugin near the TOC if true, false shows only the button
        }
    }
});

TOC Container

Other useful information (optional):

@tdipisa tdipisa added this to the 2020.02.00 milestone Dec 19, 2019
@tdipisa tdipisa changed the title [Proposal] TOC Plugin Container TOC Plugin Container Dec 19, 2019
@tdipisa tdipisa modified the milestones: 2020.02.00, 2020.03.00 Jan 15, 2020
@tdipisa tdipisa modified the milestones: 2020.03.00, 2021.01.00 Sep 25, 2020
@tdipisa tdipisa removed this from the 2021.02.00 milestone Mar 10, 2021
@tdipisa tdipisa added the inbox label Dec 19, 2022
@allyoucanmap
Copy link
Contributor Author

@tdipisa this has been solved in #9982 so it can be closed

@tdipisa tdipisa closed this as completed Apr 4, 2024
@tdipisa tdipisa added this to the 2024.01.00 milestone Apr 4, 2024
@tdipisa tdipisa added Accepted and removed inbox labels Apr 4, 2024
@tdipisa tdipisa self-assigned this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants