-
Notifications
You must be signed in to change notification settings - Fork 1
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
feature/toggle-modal #311
feature/toggle-modal #311
Conversation
What still needs to be done.
|
General comment: After a few rounds of discussion, we decided that we should not give BFF users the ability to move files off of the cache. Instead, once a file is moved onto the cache, it is given an expiration date (e.g. 6 months out). If a user later sends the request to cache the file again (while it's still in the cache), it will act as a 'refresh' on the expiration date. Quick summary of why we made this decision:
What does this mean for BFF? (and this PR)
|
* Modal overlay for displaying details of selected files for NAS cache operations. | ||
*/ | ||
export default function MoveFileManifest({ onDismiss }: ModalProps) { | ||
// const dispatch = useDispatch(); //TODO: add onMove functionality |
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.
I think this PR should/can include the action that will eventually contain the call to FSS. What I mean is that you can dispatch a "moveFIles" action that you can create in the interaction state branch & create an empty "logics" in the logic middleware file that will just log to the console rather than call FSS for now
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.
/** | ||
* Formats a file size to a human-readable string. | ||
*/ | ||
const formatFileSize = (size: number) => { |
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.
This should go after the imports, but I think we have a function for doing this sort of thing already. Look in the aggregate file box, that display already renders the appropriate byte unit.
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.
resolved in ae06c75
<div className={styles.fileListContainer}> | ||
<ul className={styles.fileList}> | ||
{fileDetails.map((file) => ( | ||
<li key={file.id} className={styles.fileItem}> |
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.
I think a table with the columns name & size would be better than this list for readability. Like so:
| File Name | File Size |
| my_file.txt | 145 MB |
| another_one.png | 206MB |
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.
resolved in 77a52bd
@@ -157,22 +157,26 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => { | |||
}, | |||
subMenuProps: { | |||
items: [ | |||
{ |
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.
The "move" option that contains these should only be rendered when the data source is "AICS FMS" (there is a constant for that value)
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.
resolved in f52d31c
}), | ||
[HIDE_VISIBLE_MODAL]: (state) => ({ | ||
...state, | ||
visibleModal: undefined, |
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.
Confused about this. Was the visible modal otherwise never being set to undefined
? Did you create this action in another 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.
Whoops accidentally duplicated our existing. Resolved in 1e3c38b
packages/core/components/Modal/MoveFileManifest/MoveFileManifest.module.css
Show resolved
Hide resolved
packages/core/components/Modal/MoveFileManifest/MoveFileManifest.module.css
Outdated
Show resolved
Hide resolved
packages/core/components/Modal/MoveFileManifest/MoveFileManifest.module.css
Outdated
Show resolved
Hide resolved
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.
Thanks for working on this! Left a few comments related to users only being allowed to move files onto the cache
], | ||
}, | ||
}, | ||
...(isQueryingAicsFms |
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.
Lets move this option above "Download"
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.
resolved in 034549d
selection.selectors.getFileSelection, | ||
FileSelection.selectionsAreEqual | ||
); | ||
const moveFileTarget = useSelector(interaction.selectors.getMoveFileTarget); |
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.
Now that we don't have a notion of moving on/off the cache it seems we can remove the idea of having a target. IMO this is likely a YAGNI since other than FMS we won't have control over moving files.
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.
resolved in 034549d
The list of files should have a gradient at the bottom of it to visually signal to users that there are more options |
cdc82e5
to
1bc859f
Compare
resolved in a450c41 |
Description
We want to present to users the option to move files on and off NAS Cache. In order to do this and convey the significance of the action we want to add the following functionality:
Relevant Issues