Skip to content

Commit

Permalink
Fixed a regression introduced in d7971bd (#1193) - plugins with targe…
Browse files Browse the repository at this point in the history
…t=hidden should never render in Drawer.
  • Loading branch information
jacobwod committed Dec 19, 2022
1 parent 33fd129 commit fd18477
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions new-client/src/plugins/BaseWindowPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,11 @@ class BaseWindowPlugin extends React.PureComponent {
windowVisible: this.state.windowVisible,
})}
</Window>
{/* Always render a Drawer button (it's a backup for plugins
render elsewhere: we hide Widget and Control buttons on
small screens and fall back to Drawer button). */}
{this.renderDrawerButton()}
{/* Always render a Drawer button unless its target is "hidden".
It's a backup for plugins render elsewhere: we hide
Widget and Control buttons on small screens and fall
back to Drawer button). */}
{target !== "hidden" && this.renderDrawerButton()}
{/* Widget buttons must also render a Widget */}
{this.pluginIsWidget(target) &&
this.renderWidgetButton(`${target}-column`)}
Expand Down
9 changes: 5 additions & 4 deletions new-client/src/plugins/DialogWindowPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ class DialogWindowPlugin extends React.PureComponent {
this.props.app.config.mapConfig.map.clean !== true && (
<>
{this.renderDialog()}
{/* Always render a Drawer button (it's a backup for plugins
render elsewhere: we hide Widget and Control buttons on
small screens and fall back to Drawer button). */}
{this.renderDrawerButton()}
{/* Always render a Drawer button unless its target is "hidden".
It's a backup for plugins render elsewhere: we hide
Widget and Control buttons on small screens and fall
back to Drawer button). */}
{target !== "hidden" && this.renderDrawerButton()}
{/* Widget buttons must also render a Widget */}
{this.#pluginIsWidget(target) &&
this.renderWidgetButton(`${target}-column`)}
Expand Down

0 comments on commit fd18477

Please sign in to comment.