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

fix(discover): switch language based on dataset selection #7924

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

joshuali925
Copy link
Member

Description

Currently the advanced dataset selector allows user to change language, but it doesn't affect UI on submit. this PR fixes it

Issues Resolved

Screenshot

image

Testing the changes

Changelog

  • skip

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 64.30%. Comparing base (a0365d8) to head (1e05b7d).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
.../public/query/query_string/query_string_manager.ts 0.00% 3 Missing ⚠️
...y_string/dataset_service/lib/index_pattern_type.ts 0.00% 2 Missing ⚠️
.../query_string/language_service/language_service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7924      +/-   ##
==========================================
- Coverage   64.30%   64.30%   -0.01%     
==========================================
  Files        3674     3674              
  Lines       81135    81135              
  Branches    12926    12927       +1     
==========================================
- Hits        52173    52171       -2     
- Misses      25751    25752       +1     
- Partials     3211     3212       +1     
Flag Coverage Δ
Linux_1 30.21% <0.00%> (ø)
Linux_2 56.19% <ø> (ø)
Linux_3 40.61% <0.00%> (-0.01%) ⬇️
Linux_4 31.40% <0.00%> (ø)
Windows_1 30.23% <0.00%> (ø)
Windows_2 56.14% <ø> (ø)
Windows_3 40.62% <0.00%> (ø)
Windows_4 31.40% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@LDrago27 LDrago27 left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -57,8 +57,8 @@ export class LanguageService {
this.languages.set(config.id, config);
}

public getLanguage(language: string): LanguageConfig | undefined {
return this.languages.get(language);
public getLanguage(languageId: string): LanguageConfig | undefined {
Copy link
Collaborator

@AMoo-Miki AMoo-Miki Sep 3, 2024

Choose a reason for hiding this comment

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

Is this a released public API we are changing? If unreleased ignore plz.

Copy link
Member Author

Choose a reason for hiding this comment

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

changing the parameter variable name shouldn't affect users of this API, and regarding documentation i don't think it's released, didn't find documentation for it

@LDrago27 LDrago27 merged commit edabe3b into opensearch-project:main Sep 3, 2024
66 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 3, 2024
* fix(discover): switch language based on dataset selection

Signed-off-by: Joshua Li <[email protected]>

* keep currently selected language as default option

Signed-off-by: Joshua Li <[email protected]>

* update supportedLanguages mock

Signed-off-by: Joshua Li <[email protected]>

---------

Signed-off-by: Joshua Li <[email protected]>
(cherry picked from commit edabe3b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Sep 3, 2024
)

* fix(discover): switch language based on dataset selection



* keep currently selected language as default option



* update supportedLanguages mock



---------


(cherry picked from commit edabe3b)

Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x discover for discover reinvent seasoned-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants