mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
Feat/v3 UI updates (#6618)
* style: enhance button layout and input styles across multiple components for improved UI consistency * style: update RequestsNotLoaded component with new warning styles and enhance theme color definitions for status indicators * refactor: update theme usage across components for consistency - Changed color references from theme.brand to theme.primary.text in various StyledWrapper components. - Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings. - Removed unnecessary margin and padding adjustments in several components for cleaner layout. - Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown. - Standardized styling for method indicators in RequestPane components. These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines. * refactor: clean up method selector styling in NewRequest component * chore: temp playwright test fixes * refactor: update modal sizes across various components for consistency - Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components. - Improved styling in HttpMethodSelector by adding padding for better layout. - Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability. * refactor: enhance styling and theme integration in TimelineItem components - Updated HttpMethodSelector to clarify padding calculation in comments. - Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency. - Adjusted Method component to use uppercase styling for method display. - Modified RelativeTime component to apply muted text color for improved readability. - Updated INFO color in dark and light themes for better contrast and accessibility. * refactor: remove duplicate import statements in theme files - Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability. * refactor: improve styling and theme integration in various components - Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper. - Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency. - Introduced a new textbox class in NewRequest StyledWrapper for better styling control. - Changed modal size from "sm" to "md" in CreateEnvironment for improved layout. --------- Co-authored-by: Bijin A B <bijin@usebruno.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { test, expect } from '../../../playwright';
|
||||
import { closeAllCollections, createRequest } from '../../utils/page';
|
||||
import { closeAllCollections, createCollection, createRequest } from '../../utils/page';
|
||||
|
||||
test.describe('Code Generation URL Encoding', () => {
|
||||
test.afterEach(async ({ page }) => {
|
||||
@@ -21,20 +21,8 @@ test.describe('Code Generation URL Encoding', () => {
|
||||
const collectionName = 'unencoded-test-collection';
|
||||
const requestName = 'curl-encoding-unencoded';
|
||||
|
||||
// Use plus icon button in new workspace UI
|
||||
await page.getByTestId('collections-header-add-menu').click();
|
||||
await page.locator('.tippy-box .dropdown-item').filter({ hasText: 'Create collection' }).click();
|
||||
await page.getByLabel('Name').fill(collectionName);
|
||||
const locationInput = page.getByLabel('Location');
|
||||
if (await locationInput.isVisible()) {
|
||||
await locationInput.fill(await createTmpDir(collectionName));
|
||||
}
|
||||
await page.locator('.bruno-modal').getByRole('button', { name: 'Create', exact: true }).click();
|
||||
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: collectionName })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: collectionName }).click();
|
||||
|
||||
// Create a new request using the dialog/modal flow
|
||||
// Create collection and request
|
||||
await createCollection(page, collectionName, await createTmpDir(collectionName));
|
||||
await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John Doe' });
|
||||
|
||||
// Click the request in the sidebar
|
||||
@@ -64,20 +52,8 @@ test.describe('Code Generation URL Encoding', () => {
|
||||
const collectionName = 'encoded-test-collection';
|
||||
const requestName = 'curl-encoding-encoded';
|
||||
|
||||
// Use plus icon button in new workspace UI
|
||||
await page.getByTestId('collections-header-add-menu').click();
|
||||
await page.locator('.tippy-box .dropdown-item').filter({ hasText: 'Create collection' }).click();
|
||||
await page.getByLabel('Name').fill(collectionName);
|
||||
const locationInput = page.getByLabel('Location');
|
||||
if (await locationInput.isVisible()) {
|
||||
await locationInput.fill(await createTmpDir(collectionName));
|
||||
}
|
||||
await page.locator('.bruno-modal').getByRole('button', { name: 'Create', exact: true }).click();
|
||||
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: collectionName })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: collectionName }).click();
|
||||
|
||||
// Create a new request using the dialog/modal flow
|
||||
// Create collection and request
|
||||
await createCollection(page, collectionName, await createTmpDir(collectionName));
|
||||
await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John%20Doe' });
|
||||
|
||||
// Click the request in the sidebar
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test, expect } from '../../../playwright';
|
||||
import { openCollection } from '../../utils/page';
|
||||
import { createCollection, openCollection } from '../../utils/page';
|
||||
import { getTableCell } from '../../utils/page/locators';
|
||||
|
||||
test('should persist request with newlines across app restarts', async ({ createTmpDir, launchElectronApp }) => {
|
||||
@@ -10,11 +10,7 @@ test('should persist request with newlines across app restarts', async ({ create
|
||||
const app1 = await launchElectronApp({ userDataPath });
|
||||
const page = await app1.firstWindow();
|
||||
|
||||
await page.getByTestId('collections-header-add-menu').click();
|
||||
await page.locator('.tippy-box .dropdown-item').filter({ hasText: 'Create collection' }).click();
|
||||
await page.locator('.bruno-modal').getByLabel('Name').fill('newlines-persistence');
|
||||
await page.locator('.bruno-modal').getByLabel('Location').fill(collectionPath);
|
||||
await page.locator('.bruno-modal').getByRole('button', { name: 'Create' }).click();
|
||||
await createCollection(page, 'newlines-persistence', collectionPath);
|
||||
|
||||
const collection = page.getByTestId('collections').locator('.collection-name').filter({ hasText: 'newlines-persistence' });
|
||||
await collection.hover();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test, expect, Locator, Page } from '../../../playwright';
|
||||
import { closeAllCollections } from '../../utils/page';
|
||||
import { closeAllCollections, createCollection } from '../../utils/page';
|
||||
import { buildCommonLocators } from '../../utils/page/locators';
|
||||
import { waitForPredicate } from '../../utils/wait';
|
||||
|
||||
@@ -9,16 +9,8 @@ const isRequestSaved = async (saveButton: Locator) => {
|
||||
};
|
||||
|
||||
const setup = async (page: Page, createTmpDir: (tag?: string | undefined) => Promise<string>) => {
|
||||
await page.getByTestId('collections-header-add-menu').click();
|
||||
await page.locator('.tippy-box .dropdown-item').filter({ hasText: 'Create collection' }).click();
|
||||
await page.getByLabel('Name').fill('source-collection');
|
||||
const locationInput = page.getByLabel('Location');
|
||||
if (await locationInput.isVisible()) {
|
||||
await locationInput.fill(await createTmpDir('source-collection'));
|
||||
}
|
||||
await page.locator('.bruno-modal').getByRole('button', { name: 'Create', exact: true }).click();
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: 'source-collection' })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: 'source-collection' }).click();
|
||||
await createCollection(page, 'source-collection', await createTmpDir('source-collection'));
|
||||
|
||||
const sourceCollection = page.locator('.collection-name').filter({ hasText: 'source-collection' });
|
||||
await sourceCollection.hover();
|
||||
await sourceCollection.locator('.collection-actions .icon').click();
|
||||
|
||||
Reference in New Issue
Block a user