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

DEV: Move semantic search out of connector to component #906

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markvanlan
Copy link
Contributor

This PR allows the semantic search component to be rendered by another plugin, rather than being defined in the connector, which limits it's usage.

import I18n from "I18n";
import AiIndicatorWave from "./ai-indicator-wave";

export default class AiFullPageSemanticSearch extends Component {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're updating the name of Semantic Search -> AI search (see /t/141433), so maybe we can change this while we're at it to:

Suggested change
export default class AiFullPageSemanticSearch extends Component {
export default class AiFullPageSearch extends Component {

import icon from "discourse-common/helpers/d-icon";
import I18n from "I18n";
import AiIndicatorWave from "../../components/ai-indicator-wave";
import AIFullPageSemanticSearch from "discourse/plugins/discourse-ai/discourse/components/ai-full-page-semantic-search";
Copy link
Member

@keegangeorge keegangeorge Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my previous comment, and maybe we can use relative path as it's more concise?

Suggested change
import AIFullPageSemanticSearch from "discourse/plugins/discourse-ai/discourse/components/ai-full-page-semantic-search";
import AiFullPageSearch from "../../components/ai-full-page-search";

import icon from "discourse-common/helpers/d-icon";
import I18n from "I18n";
import AiIndicatorWave from "../../components/ai-indicator-wave";
import AIFullPageSemanticSearch from "discourse/plugins/discourse-ai/discourse/components/ai-full-page-semantic-search";

export default class SemanticSearch extends Component {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export default class SemanticSearch extends Component {
export default class AiSearch extends Component {

</div>
</div>
{{/if}}
<AIFullPageSemanticSearch @outletArgs={{@outletArgs}} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<AIFullPageSemanticSearch @outletArgs={{@outletArgs}} />
<AiFullPageSearch @outletArgs={{@outletArgs}} />

Copy link
Member

@keegangeorge keegangeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM, but some small requests

@SamSaffron
Copy link
Member

@markvanlan where are we on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants