Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/features/opensearch-dashboards/dashboards-ui-ux-fixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ graph TB
#### Navigation Fixes
- **Nav Group Assignment**: Fixed visualization pages showing incorrect nav group when workspace is disabled
- **Sample Data Category**: Moved sample data from "Custom" to "Settings and Setup" category
- **Sidecar Compatibility**: Fixed navigation icon positioning when sidecar panel is docked to the left

#### Query Editor Fixes
- **Suggestions Popup**: Fixed suggestions not closing after pressing Enter to submit query
Expand All @@ -86,6 +87,9 @@ graph TB
- Replaced `@elastic/filesaver` with `file-saver` library
- Replaced `formatNumWithCommas` with native `toLocaleString()`

#### Data Frame Fixes
- **Null/Undefined Handling**: Fixed TypeError when processing data frames with null or undefined values in nested object fields

## Limitations

- UI fixes are incremental improvements
Expand All @@ -96,6 +100,8 @@ graph TB

| Version | PR | Description |
|---------|-----|-------------|
| v3.0.0 | [#9514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9514) | Make nav icon style compatible with sidecar |
| v3.0.0 | [#9516](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9516) | Fix data frame null or undefined object conversion error |
| v3.0.0 | [#9665](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9665) | Fix workspace disabled navigation |
| v3.0.0 | [#9666](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9666) | Close suggestions after query submission |
| v3.0.0 | [#9668](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9668) | Fix dataset selector flashing |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# UI/UX Improvements

## Summary

OpenSearch Dashboards v3.0.0 includes two UI/UX bug fixes that improve navigation compatibility with the sidecar panel and fix data frame conversion errors when handling null or undefined values.

## Details

### What's New in v3.0.0

#### Navigation Icon Sidecar Compatibility

Fixed an issue where the navigation toggle icon was not properly positioned when the sidecar panel (e.g., chatbot) was docked to the left side of the screen.

**Problem**: The navigation toggle button used a fixed position with `left: 0`, which caused it to overlap with the sidecar panel when docked to the left.

**Solution**: Added dynamic left positioning based on sidecar configuration. When the sidecar is docked to the left, the navigation icon adjusts its position to account for the sidecar width.

```mermaid
graph LR
subgraph "Before Fix"
A1[Sidecar Left] --> B1[Nav Icon Overlaps]
end
subgraph "After Fix"
A2[Sidecar Left] --> B2[Nav Icon Offset]
end
```

#### Data Frame Null/Undefined Conversion Fix

Fixed a TypeError that occurred when processing data frames containing null or undefined values in nested object fields.

**Problem**: The `processNestedFieldEntry` function called `Object.entries()` on values without checking for null/undefined, causing "Cannot convert undefined or null to object" errors.

**Solution**: Added a null check before calling `Object.entries()`, returning the value directly when it's falsy.

```typescript
// Before (caused error)
Object.entries(value).forEach(...)

// After (fixed)
if (!value) {
return value;
}
Object.entries(value).forEach(...)
```

### Technical Changes

#### New Components

| Component | Description |
|-----------|-------------|
| `getSidecarLeftNavStyle` | Helper function to calculate left offset for nav elements when sidecar is docked left |

#### Changed Files

| File | Change |
|------|--------|
| `src/core/public/overlays/sidecar/helper.ts` | Added `getSidecarLeftNavStyle` function |
| `src/core/public/chrome/ui/header/header.tsx` | Applied sidecar left nav style to toggle button |
| `src/core/public/chrome/ui/header/collapsible_nav_group_enabled.scss` | Changed `.searchBarIcon` from `fixed` to `relative` position |
| `src/plugins/data/common/data_frames/utils.ts` | Added null check in `processNestedFieldEntry` |

### Usage Example

The sidecar left nav style helper:

```typescript
import { getSidecarLeftNavStyle } from '../../../overlays';

// Returns { left: paddingSize } when sidecar is docked left
// Returns {} otherwise
const style = getSidecarLeftNavStyle(sidecarConfig);
```

## Limitations

- Navigation icon positioning only applies when sidecar is docked to the left
- The null check fix applies to all nested object fields in data frames

## Related PRs

| PR | Description |
|----|-------------|
| [#9514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9514) | Make nav icon style compatible with sidecar |
| [#9516](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9516) | Fix data frame null or undefined object conversion error |

## References

- [OpenSearch Dashboards Repository](https://github.com/opensearch-project/OpenSearch-Dashboards)

## Related Feature Report

- [Full feature documentation](../../../../features/opensearch-dashboards/dashboards-ui-ux-fixes.md)
1 change: 1 addition & 0 deletions docs/releases/v3.0.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Dashboards CI/CD & Documentation](features/opensearch-dashboards/dashboards-ci-cd-documentation.md)
- [Dashboards Cypress Testing](features/opensearch-dashboards/dashboards-cypress-testing.md)
- [Dashboards UI/UX Fixes](features/opensearch-dashboards/dashboards-ui-ux-fixes.md)
- [UI/UX Improvements](features/opensearch-dashboards/ui-ux-improvements.md)

## sql

Expand Down