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

ui: Remove monorepo #355

Merged
merged 6 commits into from
Apr 16, 2020
Merged

ui: Remove monorepo #355

merged 6 commits into from
Apr 16, 2020

Conversation

breezewish
Copy link
Member

This PR removes the monorepo to make life easier.

Fix #324
Fix #280
Fix #269
Fix #170
Fix #75

Also fix:

  • Some styles and scripts were imported / executed multiple times
  • Some package stylesheets did not have Dashboard global theme color
  • Could not use @import '~antd/es/... in packages
  • Could not import @umijs/hooks in packages
  • KeyViz produced several lint warnings

Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Comment on lines +15 to +33
static newReactSpaApp = function (rootComponentAsyncLoader, targetDomId) {
const reactLifecycles = singleSpaReact({
React,
ReactDOM,
loadRootComponent: async () => {
const component = await rootComponentAsyncLoader()
if (component.default) {
return component.default
}
return component
},
domElementGetter: () => document.getElementById(targetDomId),
})
return {
bootstrap: [reactLifecycles.bootstrap],
mount: [reactLifecycles.mount],
unmount: [reactLifecycles.unmount],
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

perfect!

Comment on lines +5 to +6
import { Head } from '@lib/components'
import { DateTime } from '@lib/components'
Copy link
Collaborator

Choose a reason for hiding this comment

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

not a big deal, but can be combined, same as the following line 7 and 9

Comment on lines +7 to +8
import { Head } from '@lib/components'
import { CardTableV2 } from '@lib/components'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

import { Card, CardTableV2 } from '@lib/components'
import client from '@lib/client'
import { useClientRequest } from '@lib/utils/useClientRequest'
import DateTime from '@lib/components/DateTime'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

Comment on lines +1 to +5
import client from '@lib/client'
import {
LogsearchCreateTaskGroupRequest,
LogsearchSearchTarget,
} from '@pingcap-incubator/dashboard_client'
} from '@lib/client'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

Comment on lines +1 to +2
import client from '@lib/client'
import { LogsearchSearchTarget, LogsearchTaskGroupResponse } from '@lib/client'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

Comment on lines +1 to +2
import client from '@lib/client'
import { LogsearchTaskModel } from '@lib/client'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

Comment on lines +1 to +2
import client from '@lib/client'
import { LogsearchSearchTarget, LogsearchTaskModel } from '@lib/client'
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I did a global search & replace, so there will be some duplicate imports..

Copy link
Collaborator

@baurine baurine left a comment

Choose a reason for hiding this comment

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

awesome! so huge the work!

@baurine baurine merged commit 227cca7 into master Apr 16, 2020
@baurine baurine deleted the drop-monorepo branch April 16, 2020 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants