Baluduvamsi2006 opened a new pull request, #3309:
URL: https://github.com/apache/apisix-dashboard/pull/3309
# Why submit this pull request?
- [ ] Bugfix
- [x] New feature provided
- [x] Improve performance
- [ ] Backport patches
---
# What changes will this PR take into?
This PR introduces a global one-click copy-to-clipboard functionality for
Resource IDs across all list pages to significantly improve user experience. It
also resolves persistent E2E test timeout and file path issues when running
locally on Windows.
---
# Detailed Implementation
## ✨ Feature: Global Copy-to-Clipboard Support
- Replaces generic text IDs with Ant Design’s native `Typography.Text`
`copyable` component across **11 list views**:
- Services
- Routes
- Upstreams
- SSLs
- Consumers
- Global Rules
- Plugin Configs
- Protos
- Secrets
- Consumer Groups
- Credentials
- Explicitly casts underlying IDs and usernames to `string` to ensure
reliable behavior with `Typography.Text`.
- Adds full i18n support for:
- `copy` (hover tooltip)
- `copy_success` (success message)
Supported locales:
- English (en)
- Chinese (zh)
- Spanish (es)
- German (de)
- Turkish (tr)
- Integrates copyable behavior consistently into `PluginCard` components.
---
## 🐛 Bugfix (E2E): Windows Path Resolution
- Fixes an incorrect path resolution issue in `e2e/utils/common.ts`.
- `new URL('.').pathname` prepended an extra slash on Windows, causing
duplicated drive letters (e.g. `D:\D:\`) and breaking `apisix_conf.yml`
Playwright lookups.
- Replaced with Node.js native `fileURLToPath()` for correct, cross-platform
path handling.
---
## 🐛 Bugfix (E2E): Monaco Editor Race Condition
- Fixes `TypeError: Cannot read properties of undefined (reading
'getModel')` occurring across multiple Playwright tests.
- Root cause: `window.__monacoEditor__` was not reliably available during
test execution.
- Resolution:
- Explicitly exposes the Monaco editor during component mounting.
- Adds a physical keystroke fallback (`Ctrl + A → Backspace`) inside
`uiClearMonacoEditor` to safely clear editor content during form interactions.
This eliminates flaky E2E failures and stabilizes Playwright execution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]