Skip to content

Commit

Permalink
fix: order of query editor extensions not working (#8045)
Browse files Browse the repository at this point in the history
* fix: order it query editor extensions not working

Signed-off-by: Yulong Ruan <[email protected]>

* tweaks query assist extension styles

Signed-off-by: Yulong Ruan <[email protected]>

* Changeset file for PR #8045 created/updated

---------

Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
ruanyl and opensearch-changeset-bot[bot] authored Sep 9, 2024
1 parent e528e2e commit cedba8e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8045.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Order of query editor extensions not working ([#8045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8045))
9 changes: 9 additions & 0 deletions src/plugins/data/public/ui/query_editor/_query_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@
}
}

.osdQueryEditor__header {
display: flex;
align-items: center;

.osdQueryEditorExtensionComponent {
padding: 0 $euiSizeXS $euiSizeXS;
}
}

.osdQueryEditor__topBar {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ const QueryEditorExtensions: React.FC<QueryEditorExtensionsProps> = React.memo((

return (
<>
{sortedConfigs.map((config) => (
<QueryEditorExtension
key={config.id}
config={config}
dependencies={dependencies}
componentContainer={componentContainer}
bannerContainer={bannerContainer}
/>
))}
{sortedConfigs.map((config) => {
const extensionComponentContainer = document.createElement('div');
extensionComponentContainer.className = `osdQueryEditorExtensionComponent osdQueryEditorExtensionComponent__${config.id}`;
componentContainer.appendChild(extensionComponentContainer);

return (
<QueryEditorExtension
key={config.id}
config={config}
dependencies={dependencies}
componentContainer={extensionComponentContainer}
bannerContainer={bannerContainer}
/>
);
})}
</>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/

.queryAssist {
&.queryAssist__form {
padding: 0 $euiSizeXS $euiSizeXS;
}

&.queryAssist__callout {
margin-top: $euiSizeXS;
}
}

.osdQueryEditorExtensionComponent__query-assist {
flex-grow: 1;
}

0 comments on commit cedba8e

Please sign in to comment.