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

chore: move ui kit to separate repo #8104

Merged
merged 8 commits into from
Oct 19, 2023
Merged

Conversation

ashtonG
Copy link
Contributor

@ashtonG ashtonG commented Oct 10, 2023

Description

This moves the source of the ui kit to a separate repo at determined-ai/determined-ui. the old UI kit is removed and all imports are updated. The new UI kit doesn't currently have CI or netlify set up (we need to set up another set of github credentials so the differ works), so the design kit and differ will continue to run here while that gets up and going.

Test Plan

Code behavior should be unchanged:

  • all tests on PR should pass
  • screenshot differ shouldn't find any differences on PR
  • build should succeed on PR

Commentary (optional)

because this is being installed from github, the package is built on install -- we should perhaps move to publishing this on the npm registry behind an organization (which will allow organizational control over who pushes new versions).

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

WEB-1687

@ashtonG ashtonG requested a review from a team as a code owner October 10, 2023 17:19
@cla-bot cla-bot bot added the cla-signed label Oct 10, 2023
@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit c54daba
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/653036b9c6a2010008b016fd
😎 Deploy Preview https://deploy-preview-8104--determined-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@determined-ci
Copy link
Collaborator

determined-ci commented Oct 10, 2023

Hello! DesignKit diffs for commit c54daba are available for you to view here

@ClaireNeveu ClaireNeveu requested review from EmilyBonar and removed request for hkang1 October 11, 2023 14:19
Copy link
Contributor

@johnkim-det johnkim-det left a comment

Choose a reason for hiding this comment

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

Looks great, excited to start developing on the new repo

Copy link
Contributor

@EmilyBonar EmilyBonar left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -165,6 +165,7 @@ const ExperimentMultiTrialTabs: React.FC<Props> = ({
disableTitle
notes={{ contents: experiment.notes ?? '', name: 'Notes' }}
onError={handleError}
onPageUnloadHook={unstable_useBlocker}
Copy link
Contributor

Choose a reason for hiding this comment

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

q: What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the Note component that NoteCards renders should prompt the user when leaving the page if they're sure they want to leave if the note in question has dirty state. Before the split, Note imported unstable_useBlocker directly from react-router-dom to do the prompt, but that requires a data router in the component context, so now we pass the hook in from the caller via onPageUnloadHook.

Comment on lines 2 to 3
import { XOR } from 'determined-ui/internal/types';
import usePrevious from 'determined-ui/internal/usePrevious';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we shouldn't be importing from internal, so these should either be duplicated in this repo or exposed more officially. in my Icon pr I chose to duplicate XOR, but exposing some utility types/hooks in determined-ui sounds like a good plan

@@ -1,8 +1,8 @@
import { Alert } from 'antd';
import Message from 'determined-ui/internal/Message';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: again about internal, though John's Message PR should fix this one

@@ -1,10 +1,10 @@
import Icon from 'determined-ui/Icon';
import { DetError } from 'determined-ui/internal/types';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: internal

@@ -1,7 +1,7 @@
import { LineChart } from 'determined-ui/LineChart';
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: nothing to do with this page specifically, but it feels like LineChart should be the default export from determined-ui/LineChart

Comment on lines +7 to +8
import LogViewerSelect, { Filters } from 'determined-ui/LogViewer/LogViewerSelect';
import { Settings, settingsConfigForTrial } from 'determined-ui/LogViewer/LogViewerSelect.settings';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe re-export the settings from the main file?

@ashtonG ashtonG force-pushed the chore/WEB-1687/ui-kit-module branch 2 times, most recently from ab86cd3 to 7c5abff Compare October 18, 2023 19:18
This moves the source of the ui kit to a separate repo at
determined-ai/determined-ui. the old UI kit is removed and all imports
are updated. The new UI kit doesn't currently have CI or netlify set up (we
need to set up another set of github credentials so the differ works),
so the design kit and differ will continue to run here while that gets
up and going.
@ashtonG ashtonG force-pushed the chore/WEB-1687/ui-kit-module branch from c22b331 to c54daba Compare October 18, 2023 19:49
@ashtonG ashtonG merged commit 3af965f into main Oct 19, 2023
68 of 81 checks passed
@ashtonG ashtonG deleted the chore/WEB-1687/ui-kit-module branch October 19, 2023 14:43
@dannysauer dannysauer added this to the 0.26.3 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants