Skip to content

Conversation

@losingle
Copy link

  • Add right-click close functionality for tabs
  • Add 'Close tab' translations for multiple languages including:
    • English
    • Chinese (Simplified & Traditional)
    • Japanese
    • Korean
    • French
    • Spanish
    • German
    • Russian

- Improve UI button text (simplify Home/Back/Switch buttons)
- Refine Experitest related translations
- Update refresh source related text to be more intuitive
- Keep data center names in English (US-West/East, EU-Central)
- Improve clarity and consistency of translations
- Add right-click close functionality for tabs
- Add 'Close tab' translations for multiple languages including:
  - English
  - Chinese (Simplified & Traditional)
  - Japanese
  - Korean
  - French
  - Spanish
  - German
  - Russian
@github-actions github-actions bot added enhancement New feature or request i18n Translation changes labels Apr 17, 2025
"Key": "Key",
"Secret": "Secret"
"Secret": "Secret",
"Close tab": "Close tab"
Copy link
Contributor

Choose a reason for hiding this comment

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

It is enough to only add English resources. localized resources are synchronized automatically to crowdin as soon as the PR is merged and should not be changed manually.

Copy link
Author

Choose a reason for hiding this comment

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

I only kept English resources

Copy link
Collaborator

@eglitise eglitise left a comment

Choose a reason for hiding this comment

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

First of all, thank you for the PR!
It looks like you are mixing up two different sets of tabs - one is used for switching between server types (Appium server & any cloud providers), and the other is used for session builder tabs (session builder, saved sets, attach to session). I would suggest only including changes for the former in this PR.
I do think the added functionality is useful, but a) it changes the regular right-click behavior that applies elsewhere in the app, and b) it may be less hacky to implement antd's own tab close button functionality.

const [activeTab, setActiveTab] = useState(SESSION_BUILDER_TABS.CAPS_BUILDER);

const isAttaching = tabKey === 'attach';
const isAttaching = serverType === 'attach';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure why this was changed. tabKey is used for session builder tabs, but serverType is used for the server type tabs.

bindWindowClose();
switchTabs(SESSION_BUILDER_TABS.CAPS_BUILDER);
await getSavedSessions();
await setVisibleProviders();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why this was removed?

} = props;

const navigate = useNavigate();
const [activeTab, setActiveTab] = useState(SESSION_BUILDER_TABS.CAPS_BUILDER);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't quite see the reason in adding this, along with handleTabChange and handleSwitchTabs. Switching session builder tabs is also not related to the server type tab closing functionality.

tabKey,
switchTabs,
serverType,
setServerType,
Copy link
Collaborator

Choose a reason for hiding this comment

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

No such function exists. You probably wanted to use changeServerType

{
key: 'closeTab',
label: t('Close tab'),
onClick: () => handleCloseTab(tabKey),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately this action will also trigger handleSelectServerTab, which will try to select the same tab that was just removed

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

Labels

enhancement New feature or request i18n Translation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants