-
Notifications
You must be signed in to change notification settings - Fork 113
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
[KED-2997] Create rename run and edit notes UI behavior #665
[KED-2997] Create rename run and edit notes UI behavior #665
Conversation
…into feature/rename-run-and-edit-notes-behavior#ked-2997
…into feature/rename-run-and-edit-notes-behavior#ked-2997
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, the UI works great!
I've added some futher comments, in particular some suggestions of taking out the need of the selectedMetadataRunId
hook and assigning the run metadata directly on click.
Adding in a request change to also remind us not to merge this in until the mutation endpoints are merged in as a completed feature for this user journey.
const MIN_HEIGHT = 20; | ||
|
||
const Input = ({ | ||
characterLimit = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we set this to 0 by default then we would not need the seperate check for isLimitSet
characterLimit = false, | |
characterLimit = 0, |
…into feature/rename-run-and-edit-notes-behavior#ked-2997
@@ -0,0 +1,54 @@ | |||
import React from 'react'; | |||
import Button from '@quantumblack/kedro-ui/lib/components/button'; | |||
import Modal from '@quantumblack/kedro-ui/lib/components/modal'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, the Kedro-UI modal PR is ready to merge. Just need someone to review the handleKeyevents stuff. Can we use that in this if it gets merged before this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, absolutely we can.
src/components/experiment-tracking/run-details-modal/run-details-modal.test.js
Outdated
Show resolved
Hide resolved
…into feature/rename-run-and-edit-notes-behavior#ked-2997
…into feature/rename-run-and-edit-notes-behavior#ked-2997
…into feature/rename-run-and-edit-notes-behavior#ked-2997
Thanks for the efforts for aligning on the mutation @tynandebold and @rashidakanchwala. I tested this branch this morning and just now with the new changes that was merged in earlier today, and noticed the following:
|
2 more comments about the behaviour of the FE:
Current modal: Design: |
…ror; use placeholder for notes field
…into feature/rename-run-and-edit-notes-behavior#ked-2997
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, looks great and works well. Thanks @tynandebold
Would like @limdauto to review the BE work.
Also nit, currently Apply Changes doesn't close modal. It felt more natural to me it would. But there's no requirements of such in the design.
@tynandebold on checking out this branch and running the app I've been getting the following error - looks like it's worth revisiting? |
@rashidakanchwala was getting the same thing yesterday. I think you just need to restart all servers/ |
…into feature/rename-run-and-edit-notes-behavior#ked-2997
.circleci/config.yml
Outdated
- v${CACHE_VERSION}-{{ arch }}-dependencies-{{ checksum "package.json" }} | ||
- v${CACHE_VERSION}-{{ arch }}-dependencies- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these changes relevant to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort of. They're an addendum to what @limdauto did yesterday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea this is needed to separate linux
cache from windows
cache in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well for me now - let's get this in once the CI is all clear 😉
…into feature/rename-run-and-edit-notes-behavior#ked-2997
* add pencil/edit icon; create run-details modal; open/close of that modal working * add basic text area in modal * local creation of an Input component * create ui folder and add generic textarea and input components * use text-decoration for active state * modal gets dynamic data from selected run * run details modal tests * rename textarea to input and use that in modal; remove other input component * test written for input component * updates based on PR review * Rashida's PR reviews; hide edit run button when comparison view is on * fix typos; update general edit run modal behavior * add runDetails mutation * remove searchable text; add client to mutation so tests pass * don't format schema * Update backend schema * Fixed mypy error * fixed mypy2 * fixed pylint error * update to id from runId in graphql response * update run_id to id in response -2 * UpdateRunDetails returns Run * correct response from updateRunDetails mutation; reset mutation on error; use placeholder for notes field * fix run-selection anomoly * fix failing RunDetailsModal test * update mutation response * use the Modal component from the repo, not the QB UI one * fix failing RunDetailsModal test * remove working_directory from circleci * add working_directory to build_38 * use tmp folder instead of repo * revert and use arch * revert by removing working_directory from build_38 and test build again * clear input on trigger; remove arch from circle ci Co-authored-by: Rashida Kanchwala <[email protected]> Signed-off-by: Rashida Kanchwala <[email protected]>
* add pencil/edit icon; create run-details modal; open/close of that modal working * add basic text area in modal * local creation of an Input component * create ui folder and add generic textarea and input components * use text-decoration for active state * modal gets dynamic data from selected run * run details modal tests * rename textarea to input and use that in modal; remove other input component * test written for input component * updates based on PR review * Rashida's PR reviews; hide edit run button when comparison view is on * fix typos; update general edit run modal behavior * add runDetails mutation * remove searchable text; add client to mutation so tests pass * don't format schema * Update backend schema * Fixed mypy error * fixed mypy2 * fixed pylint error * update to id from runId in graphql response * update run_id to id in response -2 * UpdateRunDetails returns Run * correct response from updateRunDetails mutation; reset mutation on error; use placeholder for notes field * fix run-selection anomoly * fix failing RunDetailsModal test * update mutation response * use the Modal component from the repo, not the QB UI one * fix failing RunDetailsModal test * remove working_directory from circleci * add working_directory to build_38 * use tmp folder instead of repo * revert and use arch * revert by removing working_directory from build_38 and test build again * clear input on trigger; remove arch from circle ci Co-authored-by: Rashida Kanchwala <[email protected]> Signed-off-by: Rashida Kanchwala <[email protected]>
Description
Resolves KED-2997.
Development notes
To do this, I've created a couple of new components:
Front-end :
<RunDetailsModal/>
component, based on the<SettingsModal/>
that we already had, except this new one isn't connected in any way to Redux. It does share a lot of styles with the<SettingsModal/>
, as I'm importing that CSS file.<Input/>
component that lives within a newcomponents/ui
folder. This component actually uses a<textarea/>
HTML element under the hood, which gives good flexibility. And further, going forward, I think we can start to move some UI-only components into this folder and create any new UI components here, as needed.<Pencil/>
icon component.Backend :
UpdateRunDetailSuccess now returns a Run with the latest changes requested by the user instead of returning a JSONObject as it did previously.
QA notes
Check out the branch and click on the Edit details pencil icon or the run metadata title/notes text to trigger the modal.
Checklist
RELEASE.md
file