Skip to content

Conversation

@thatblindgeye
Copy link
Contributor

@thatblindgeye thatblindgeye commented Jun 22, 2022

What: Closes #7691, closes #7692 This is a proposed template for composable components, which includes the general structure and purpose of sub-components.

Dual list selector
File upload - multiple

The two components updated in this PR show how two of the different composable components could look. One being a component that is only composable (file upload multi) or one that has a non-composable and a composable structure (dual list selector).

For the dual list selector, I created a new level 2 heading for the "Composable structure" section to separate it out a little more. I'm not sure if this would end up causing any confusion, i.e. "is the Examples section the only examples, why does this other section also have examples then, etc etc". I also did notice a typo in my description for DualListSelectorControl (I only mention "selected options" when it should be "selected or all") that I will update along with any other suggestions that may be made.

Additional issues:

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jun 22, 2022

@thatblindgeye thatblindgeye force-pushed the composable_structure branch 2 times, most recently from 64a9949 to ca0147b Compare July 8, 2022 14:10
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

I'm really liking this! I just have a couple small notes.


/** Acts as a container for all other MultipleFileUpload sub-components.
* Logic for the callback that gets called when a file is uploaded can also
* be passed into this sub-component.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I would maybe reword the second sentence a bit to say something about this sub-component providing the actual file uploading functionality of the component, rather than just saying it's the component that would take the file uploading callback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about something along the lines of "This sub-component provides the functionality for file uploads, and logic for the callback that gets called when a file is uploaded can also be passed in."

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe a slight tweak to something like "This sub-component provides the functionality for file uploads, and access to the uploaded files via a callback." or something like that?

There's something about the "logic for the callback..." that feels off to me, though it could totally just be in how I'm reading it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps it makes things a little too verbose. I like your suggestion as it more succinctly describes what's going on.

Comment on lines 9 to 12
/** Renders a progress bar for each individual file that has been attempted to be uploaded,
* including the file name, file type, file size, and upload status. Each status item also
* has a "remove" button to remove individual items from the status list.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I'm not sure quite how technical we really need to be here, but it might be good if we mention that this sub-component also can handle the reading of the file that it gets passed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe something like, "Renders a progress bar for each individual file that has been attempted to be uploaded. This sub-component also handles reading the uploaded files to render the file name, file type, file size, and upload status." (may want to separate "upload status" from the rest? not sure if that would really tie into the file getting read or not)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like that! The only reservation I have about it is that I feel like (maybe) it implies that having it read the files is mandatory rather than something consumers can opt out of if they need custom file reading logic?

Again I might totally just be reading this wrong or reading into it too much 😅

@thatblindgeye thatblindgeye force-pushed the composable_structure branch from b5e59f2 to 96d7a23 Compare July 11, 2022 14:38
@thatblindgeye thatblindgeye marked this pull request as ready for review July 11, 2022 19:39
@thatblindgeye thatblindgeye changed the title chore(docs): create composable structure template chore(DualListSelector/MultipleFileUpload): add composable structure and component descriptions Jul 13, 2022
@nicolethoen nicolethoen merged commit 8265111 into patternfly:main Jul 15, 2022
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

Thanks for your contribution! 🎉

jenny-s51 pushed a commit to jenny-s51/patternfly-react that referenced this pull request Jul 26, 2022
…and component descriptions (patternfly#7603)

* chore(docs): create composable structure template

* Move component descriptions to individual files

* Add composable structure info to dual list selector

* Add description to tree sub-component

* Verbiage changes to sub-component descriptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants