Skip to content

Commit

Permalink
Merge branch 'main' into i18n-translations
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki authored Oct 3, 2024
2 parents c13d7c0 + f3f007a commit e0b6e17
Show file tree
Hide file tree
Showing 204 changed files with 4,582 additions and 2,287 deletions.
77 changes: 0 additions & 77 deletions .i18nrc.json

This file was deleted.

1 change: 1 addition & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
| Sean Li | [sejli](https://github.com/sejli) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Huy Nguyen | [huyaboo](https://github.com/huyaboo) | Amazon |
| Hailong Cui | [Hailong-am](https://github.com/Hailong-am) | Amazon |

## Emeritus

Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/7938.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Change dev tools to a modal ([#7938](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7938))
2 changes: 2 additions & 0 deletions changelogs/fragments/8214.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Add last updated time and cache refresh button to Discover Advanced Dataset Selector ([#8214](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8214))
2 changes: 2 additions & 0 deletions changelogs/fragments/8255.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Support data connections and multi-select table in dataset picker ([#8255](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8255))
2 changes: 2 additions & 0 deletions changelogs/fragments/8268.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Validate if the workspaces param is valid or not when consume it in the wrapper. ([#8268](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8268))
3 changes: 3 additions & 0 deletions changelogs/fragments/8332.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feat:
- [navigation] flatten left nav in Analytics(all) use case ([#8332](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8332))
- [navigation] Adjust the appearances of the left navigation menu and the landing page ([#8332](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8332))
2 changes: 2 additions & 0 deletions changelogs/fragments/8392.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n in core ([#8392](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8392))
2 changes: 2 additions & 0 deletions changelogs/fragments/8393.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n and correct duplicate i18n identifiers in console plugin ([#8393](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8393))
2 changes: 2 additions & 0 deletions changelogs/fragments/8398.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n in indexPatternManagement plugin ([#8398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8398))
2 changes: 2 additions & 0 deletions changelogs/fragments/8401.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix unprefixed i18n identifiers in dashboard plugin ([#8401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8401))
2 changes: 2 additions & 0 deletions changelogs/fragments/8403.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n in home plugin ([#8403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8403))
2 changes: 2 additions & 0 deletions changelogs/fragments/8404.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n in opensearchDashboardsReact plugin ([#8404](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8404))
2 changes: 2 additions & 0 deletions changelogs/fragments/8407.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix duplicate i18n identifiers in visualize plugin ([#8407](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8407))
2 changes: 2 additions & 0 deletions changelogs/fragments/8408.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix unprefixed i18n identifiers in management plugin ([#8408](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8408))
2 changes: 2 additions & 0 deletions changelogs/fragments/8409.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix unprefixed and duplicate i18n identifiers in visAugmenter plugin ([#8409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8409))
2 changes: 2 additions & 0 deletions changelogs/fragments/8413.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- [Workspace]Refactor use case selector in workspace creation page ([#8413](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8413))
2 changes: 2 additions & 0 deletions changelogs/fragments/8415.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
doc:
- Add Hailong-am as maintainer ([#8415](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8415))
2 changes: 2 additions & 0 deletions changelogs/fragments/8422.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Support use case populate for workspace create and list page ([#8422](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8422))
2 changes: 2 additions & 0 deletions changelogs/fragments/8435.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Remove what's new card in workspace overview page ([#8435](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8435))
2 changes: 2 additions & 0 deletions changelogs/fragments/8445.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Fix use case hidden features not accessible ([#8445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8445))
2 changes: 2 additions & 0 deletions changelogs/fragments/8461.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- [Workspace]Restrict at least one data source in workspace creation page ([#8461](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8461))
12 changes: 12 additions & 0 deletions examples/.i18nrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"paths": {
"embeddableExamples": "embeddable_examples",
"expressionsExample": "expressions_example",
"multipleDataSourceExample": "multiple_data_source_examples",
"searchExamples": "search_examples",
"stateContainerExamples": "state_containers_examples",
"uiActionsExamples": "ui_action_examples",
"uiActionsExplorer": "ui_actions_explorer"
},
"translations": []
}
103 changes: 60 additions & 43 deletions src/core/public/chrome/nav_group/nav_group_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,66 @@ describe('ChromeNavGroupService#start()', () => {
expect(groupsMap[mockedGroupBar.id].navLinks.length).toEqual(1);
});

it('should populate links with custom category if the nav link is inside second level but no entry in all use case', async () => {
const chromeNavGroupService = new ChromeNavGroupService();
const uiSettings = uiSettingsServiceMock.createSetupContract();
const chromeNavGroupServiceSetup = chromeNavGroupService.setup({ uiSettings });

chromeNavGroupServiceSetup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.all, [
{
id: 'foo',
},
]);
chromeNavGroupServiceSetup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.essentials, [
{
id: 'bar',
title: 'bar',
},
{
id: 'foo',
title: 'foo',
},
]);
const navLinkServiceStart = mockedNavLink.start({
http: mockedHttpService,
application: mockedApplicationService,
});
navLinkServiceStart.getNavLinks$ = jest.fn().mockReturnValue(
new Rx.BehaviorSubject([
{
id: 'foo',
},
{
id: 'bar',
},
{
id: 'customized_app',
},
])
);
const chromeStart = await chromeNavGroupService.start({
navLinks: navLinkServiceStart,
application: mockedApplicationService,
breadcrumbsEnricher$: new Rx.BehaviorSubject<ChromeBreadcrumbEnricher | undefined>(undefined),
workspaces: workspacesServiceMock.createStartContract(),
});
const groupsMap = await chromeStart.getNavGroupsMap$().pipe(first()).toPromise();
expect(groupsMap[ALL_USE_CASE_ID].navLinks).toEqual([
{
id: 'foo',
},
{
id: 'bar',
title: 'bar',
category: { id: 'custom', label: 'Custom', order: 8500 },
},
{
id: 'customized_app',
category: { id: 'custom', label: 'Custom', order: 8500 },
},
]);
});

it('should return navGroupEnabled from ui settings', async () => {
const chromeNavGroupService = new ChromeNavGroupService();
const uiSettings = uiSettingsServiceMock.createSetupContract();
Expand Down Expand Up @@ -381,49 +441,6 @@ describe('ChromeNavGroupService#start()', () => {
expect(currentNavGroup?.title).toEqual('barGroupTitle');
});

it('should be able to find the right nav group when visible nav group is all', async () => {
const uiSettings = uiSettingsServiceMock.createSetupContract();
const navGroupEnabled$ = new Rx.BehaviorSubject(true);
uiSettings.get$.mockImplementation(() => navGroupEnabled$);

const chromeNavGroupService = new ChromeNavGroupService();
const chromeNavGroupServiceSetup = chromeNavGroupService.setup({ uiSettings });

chromeNavGroupServiceSetup.addNavLinksToGroup(
{
id: ALL_USE_CASE_ID,
title: 'fooGroupTitle',
description: 'foo description',
},
[mockedNavLinkFoo]
);

chromeNavGroupServiceSetup.addNavLinksToGroup(
{
id: 'bar-group',
title: 'barGroupTitle',
description: 'bar description',
status: NavGroupStatus.Hidden,
},
[mockedNavLinkFoo, mockedNavLinkBar]
);

const chromeNavGroupServiceStart = await chromeNavGroupService.start({
navLinks: mockedNavLinkService,
application: mockedApplicationService,
breadcrumbsEnricher$: new Rx.BehaviorSubject<ChromeBreadcrumbEnricher | undefined>(undefined),
workspaces: workspacesServiceMock.createStartContract(),
});
mockedApplicationService.navigateToApp(mockedNavLinkBar.id);

const currentNavGroup = await chromeNavGroupServiceStart
.getCurrentNavGroup$()
.pipe(first())
.toPromise();

expect(currentNavGroup?.id).toEqual('bar-group');
});

it('should be able to find the right nav group when visible nav group length is 1 and is not all nav group', async () => {
const uiSettings = uiSettingsServiceMock.createSetupContract();
const navGroupEnabled$ = new Rx.BehaviorSubject(true);
Expand Down
Loading

0 comments on commit e0b6e17

Please sign in to comment.