Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): optimize the bundle size page #671

Merged
merged 8 commits into from
Jan 10, 2025
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
1 change: 0 additions & 1 deletion examples/modern-minimal/modern.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default defineConfig({
{
disableClientServer: !process.env.ENABLE_CLIENT_SERVER,
features: ['bundle', 'plugins', 'loader'],
mode: 'brief',
},
]);
},
Expand Down
2 changes: 1 addition & 1 deletion examples/rsbuild-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"semver7": "npm:[email protected]"
},
"devDependencies": {
"@rsbuild/core": "^1.1.1",
"@rsbuild/core": "^1.1.3",
"@rsbuild/plugin-react": "^1.0.7",
"@rsdoctor/core": "workspace:*",
"@rsdoctor/rspack-plugin": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion examples/rsbuild-minimal/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig({
},
},
port: 9988,
mode: 'brief',
// mode: 'brief',
nyqykk marked this conversation as resolved.
Show resolved Hide resolved
},
]);
},
Expand Down
8 changes: 0 additions & 8 deletions packages/components/src/components/CodeViewer/viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/* eslint-disable financial/no-float-calculation */
import React from 'react';
import { SDK } from '@rsdoctor/types';
import Editor, { OnMount } from '@monaco-editor/react';
import { isNumber } from 'lodash-es';
import { CodepenCircleOutlined } from '@ant-design/icons';
import type { editor } from 'monaco-editor';
import { getOriginalLanguage, getSelectionRange } from '../../utils';
import { DefaultEditorConfig } from './config';
Expand Down Expand Up @@ -64,12 +62,6 @@ export const CodeViewerWithDrawer: React.FC<CodeViewerProps> = (props) => {
return (
<TextDrawer
text=""
buttonProps={{
size: 'small',
icon: <CodepenCircleOutlined />,
type: 'default',
}}
buttonStyle={{ padding: `0 4px` }}
drawerProps={{
destroyOnClose: true,
title: `Code of "${props.path}"`,
Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/components/FileTree/css.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/components/src/components/FileTree/html.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/components/src/components/FileTree/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/components/src/components/FileTree/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $treeNodePrefixCls: '#{$treePrefixCls}-treenode';
height: 24px;
margin: 0;
padding: 0 4px;
font-size: 12px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
box-sizing: border-box;
Expand Down Expand Up @@ -76,5 +76,5 @@ $treeNodePrefixCls: '#{$treePrefixCls}-treenode';
.file-icon {
display: inline-block;
padding: 2px 0;
margin-left: 7px;
margin-left: 8px;
}
6 changes: 6 additions & 0 deletions packages/components/src/components/FileTree/js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/components/src/components/FileTree/unkown-file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/components/src/components/Form/keyword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export const KeywordInput: React.FC<KeywordProps> = ({
style={{ width: width ? width - labelWidth : 250 }}
placeholder={placeholder}
onChange={(e) => {
clearTimeout(timer);
if (timer) clearTimeout(timer);
const v = e.target.value.trim();
setTimeout(() => {
timer = setTimeout(() => {
setFilename(v);
}, delay);
}}
Expand Down
Loading
Loading