-
Notifications
You must be signed in to change notification settings - Fork 7
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
Abstract attachments into new components #330
Commits on May 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7faed7b - Browse repository at this point
Copy the full SHA 7faed7bView commit details -
- created AttachmentsList and AttachmentsUploader and updated Attachm…
…ents to use list and uploader components inside of the AttachmentsDropZone slot
Configuration menu - View commit details
-
Copy full SHA for 32886dd - Browse repository at this point
Copy the full SHA 32886ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30391a2 - Browse repository at this point
Copy the full SHA 30391a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec0496e - Browse repository at this point
Copy the full SHA ec0496eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 694b67a - Browse repository at this point
Copy the full SHA 694b67aView commit details -
- removed unused import in Attachments
- removed unused styled in AttachmentsList
Configuration menu - View commit details
-
Copy full SHA for 5422a15 - Browse repository at this point
Copy the full SHA 5422a15View commit details
Commits on May 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for dea50e4 - Browse repository at this point
Copy the full SHA dea50e4View commit details -
- removed unused inner components class
- added missing closing quotes to drag-dropped and content-changed event handlers
Configuration menu - View commit details
-
Copy full SHA for b59ea88 - Browse repository at this point
Copy the full SHA b59ea88View commit details -
- working, but with what feels like more re-renders than necessary, and so wondering if we can cut down on those - also wondering if AttachmentsList should be it's own separate component or just implemented as part of whatever component is using the AttachmentsDropZone and AttachmentsUploader components
Configuration menu - View commit details
-
Copy full SHA for 4720541 - Browse repository at this point
Copy the full SHA 4720541View commit details -
- removed extra custom event fire from Attachments updated
- updated handleAttachmentsAdded to do one requestUpdate for attachmentsList instead of two separate updates (one for currentAttachments, one for failedAttachments) - added requestUpdate for attachmentsUploader in handleAttachmentsRemoved
Configuration menu - View commit details
-
Copy full SHA for 15196ea - Browse repository at this point
Copy the full SHA 15196eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6b8e50 - Browse repository at this point
Copy the full SHA a6b8e50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19e8688 - Browse repository at this point
Copy the full SHA 19e8688View commit details -
- removed upload_endpoint from Attachments
- moved attachment interface from Attachments to AttachmentUploader - removed attribute: false from failedAttachments properties across all 3 components
Configuration menu - View commit details
-
Copy full SHA for 42bb4ca - Browse repository at this point
Copy the full SHA 42bb4caView commit details
Commits on May 18, 2023
-
- added two image-pickers to demo page, one for avatars, one for logos - added vector icons for avatars and logos - added removeIcon property for configuring remove icon - added uploadIcon property for configuring upload icon - added default upload_icon and max_attachments to AttachmentsUploader - reworked uploadFiles to check for when maxAttachments is 1 - reworked uploadFiles to check whether the total of currentAttachments and filesToUpload exceeds maxAttachments and to adjust the filesToUpload to only allow up to maxAttachments (assuming all of the filesToUpload will be successful) - updated addCurrentAttachment and addFailedAttachment to check for maxAttachments - updated render to check for maxAttachments and render the input as single vs multiple when 1 vs 1+
Configuration menu - View commit details
-
Copy full SHA for 237b9de - Browse repository at this point
Copy the full SHA 237b9deView commit details
Commits on May 19, 2023
-
- added example divs to attachments tab for spacing in between demo c…
…omponents - updated AttachmentsDropZone slot to remove name attribute - added maxAttachments attribute to AttachmentsPicker, and now setting maxAttachments in AttachmentsPicker and ImagePicker (instead of AttachmentsUploader) - fixed AttachmentsUploader single vs multiple input bug by creating render helper getInput() - reduced of ImagePicker img width and height to match closer to product - added actions-left styling to ImagePicker - added "remove image" to ImagePicker getActions() - need to finalize where to place the "remove image" - top right corner vs. on same horizontal plane as "upload image" vs somewhere else - created a draft Compose2 to start reworking the new attachments components into compose - removed attachment_avatar and attachment_logo from vector icons enum in favor of using attachment and attachment_image for now
Configuration menu - View commit details
-
Copy full SHA for 15c47f3 - Browse repository at this point
Copy the full SHA 15c47f3View commit details
Commits on May 22, 2023
-
- added custom width for attachments drop zone container
- moved remove icon to inside of div.image-item so as to allow for overlapping of the remove icon in the bottom right corner of the img - switched from div.actions-left, div.actions-center, and div.actions-right to just div.action-item
Configuration menu - View commit details
-
Copy full SHA for 3f12704 - Browse repository at this point
Copy the full SHA 3f12704View commit details -
- replace Compose2 with AttachmentsDropZone, AttachmentsList, and Att…
…achmentsUploader inner components - added custom event temba-container-clicked - added temba-container-clicked event listener to AttachmentsDropZone - added temba-container-clicked event handler to Compose2 - simplified AttachmentsPicker getActions and replaced div.actions-left, actions-center, and actions-right with div.action-item - unit test debugging in progress to fix attachments getting mistakenly cleared out when the component is initialized with 1+ attachments
Configuration menu - View commit details
-
Copy full SHA for 3c2b017 - Browse repository at this point
Copy the full SHA 3c2b017View commit details -
- removed delete icon directly next to img
- updated styles to remove inner image-item flexbox styling
Configuration menu - View commit details
-
Copy full SHA for d7362ea - Browse repository at this point
Copy the full SHA d7362eaView commit details
Commits on May 23, 2023
-
- cleaned up demo page to use image and trash can icons for upload an…
…d remove - added temp dupe updateComponent in compose test file to fix compile errors in contact chat test file - added configurable property for AttachmentsDropZone drop-mask text - added configurable property for AttachmentsUploader upload icon text - worked through AttachmentPicker and ImagePicker happy vs error paths to hone in on pre-upload vs. post-upload display - adding and updating unit tests in progress
Configuration menu - View commit details
-
Copy full SHA for 634e23d - Browse repository at this point
Copy the full SHA 634e23dView commit details -
- commented out failing tests marked with todo's to fix (all related …
…to the same attachments event listener bug)
Configuration menu - View commit details
-
Copy full SHA for 02e5827 - Browse repository at this point
Copy the full SHA 02e5827View commit details -
- updated ImagePicker image render to remove the check for an error a…
…nd always apply the image-item class stylings
Configuration menu - View commit details
-
Copy full SHA for 75bfd58 - Browse repository at this point
Copy the full SHA 75bfd58View commit details
Commits on May 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 01e4826 - Browse repository at this point
Copy the full SHA 01e4826View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0821a2d - Browse repository at this point
Copy the full SHA 0821a2dView commit details -
- removed extra quotes surrounding element event handlers ex. @click=…
…"${}" -> @click=${} - added min and max file size to AttachmentsUploader... when maxAttachments=1, an error is returned by the uploader... when maxAttachments=1+, the offending files are removed and the remaining files are uploaded - added helper method for displaying min max file size errors based on whether one or both are set - added temba-field wrapper to ImagePicker to display errors and help_text and eventually to use as a widget inside of RP - updated getImage to display the "attachment upload icon" initially, the attached image when populated, or the "attachment error icon" if something during upload failed or went wrong - added minFileSize of 2kb and maxFileSize of 500kb to ImagePicker attachments uploader
Configuration menu - View commit details
-
Copy full SHA for fff7c23 - Browse repository at this point
Copy the full SHA fff7c23View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ff67fa - Browse repository at this point
Copy the full SHA 9ff67faView commit details
Commits on May 25, 2023
-
- added back compose component to the window's customElements
- added configurable maxFileSize to AttachmentsPicker (same as the AttachmentsUploader by default) - AttachmentsUploader - added default values for uploadIcon, uploadText, maxAttachments, and maxFileSize properties - AttachmentsUploader - abstracted pre-upload FileList validation into helper methods - AttachmentsUploader - added removeInvalidFiles as an optional param to all validation methods (set to true by default) - when set to true, removes invalid files from the list of valid files to upload, when set to false, adds the invalid files to the this.failedAttachments array - AttachmentsUploader - added validation for equal/square file dimensions for when maxAttachments=1 - AttachmentsUploader - removed getUploadFIleSizeError helper method - ImagePicker - using a temp maxFileSize of 200 KB - ImagePicker - using temba-field errors instead of helpText for pre-upload errors - ImagePicker - removed initial icon display
Configuration menu - View commit details
-
Copy full SHA for bc5aa9c - Browse repository at this point
Copy the full SHA bc5aa9cView commit details
Commits on May 27, 2023
-
- added new 'upload started' custom event
- added attachments.ts as an attachments-related utils file for upload validation fns - added handleUploadValidation to AttachmentsPicker to validate for duplicate files, max attachments, and max file size - added InvalidFile and UploadValidationResult interfaces to AttachmentsUploader - added validateFiles which gets called before uploadFiles in AttachmentsUploader - removed check for failedAttachments when displaying uploadText in AttachmentsUploader - updated line in Compose2 to fix compile err based on attachments-related changes - added enum ImageType in ImagePicker for images, avatars, and logos in ImagePicker - added style classes for avatars and logos in ImagePicker - added handleUploadValidation to ImagePicker - ImagePicker getImage updates in progress
Configuration menu - View commit details
-
Copy full SHA for f086a31 - Browse repository at this point
Copy the full SHA f086a31View commit details -
- added helpText to AttachmentsPicker, Compose2, and ImagePicker
- added todo's to Compose2 re: necessity of explicitly declaring the widgetOnly and errors props
Configuration menu - View commit details
-
Copy full SHA for 9de8542 - Browse repository at this point
Copy the full SHA 9de8542View commit details
Commits on May 31, 2023
-
- AttachmentsPicker - commented out redundant base class props
- AttachmentsUploader - renamed validateFiles to inspectFiles and added todo for getting dimensions inside of inspectFiles - Compose2 - commented out redundant base class props - ImagePicker - commented out redundant base class props
Configuration menu - View commit details
-
Copy full SHA for 1ce7cab - Browse repository at this point
Copy the full SHA 1ce7cabView commit details -
- AttachmentsUploader - updated inspectFiles to create an array of pr…
…omises to get the dimensions of each file the user selects to upload - AttachmentsPicker - updated handleUploadValidation to reuse same uploadValidationResult var across all validation fn's - ImagePicker - updated handleUploadValidation to reuse same uploadValidationResult var across all validation fn's - attachments - moved UploadFile, InvalidUploadFile, UploadValidationResult, and Attachment interfaces here, added back validateFileDimensions, and added getFileDimensions fn that is called inside of AttachmentsUploader inspectFiles - updated demo page
Configuration menu - View commit details
-
Copy full SHA for 0409599 - Browse repository at this point
Copy the full SHA 0409599View commit details
Commits on Jun 1, 2023
-
- moved ImageType enum into attachments util file
- updated validateImageDimensions based on imageType - renamed customWidth to dropWidth in AttachmentsDropZone - removed "Upload Attachments" uploadText from AttachmentsPicker - updated AttachmentsUploader to hide uploadText if any files (regardless of success or failure) have been uploaded - ImagePicker - created styles based on imageType... switched from using img tag to using a div tag with a background-image url... commented out dropWidth, imageWidth, and imageHeight... now getting width and height based on imageType for image dimension validation in handleUploadValidation... commented out temporary hack in handleAttachmentAdded... added getDropZoneWidth, getDropZoneText, and getImageDimensions helper methods... updated getImage to remove check for this.currentAttachment.error... updated getActions to comment out check for this.currentAttachment.error... - updates to validation err msgs in progress - updates to unit tests in progress
Configuration menu - View commit details
-
Copy full SHA for 4b01db8 - Browse repository at this point
Copy the full SHA 4b01db8View commit details
Commits on Jun 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ec4a3bf - Browse repository at this point
Copy the full SHA ec4a3bfView commit details -
- added case switch to getImageDimensions and getDropZoneWidth
- added dimensions for each image type - updated validateImageDimensions err msg to refer to imageType instead of just "File uploads"
Configuration menu - View commit details
-
Copy full SHA for 6b630f2 - Browse repository at this point
Copy the full SHA 6b630f2View commit details
Commits on Jun 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2c386cb - Browse repository at this point
Copy the full SHA 2c386cbView commit details -
- AttachmentsList - got rid of extra check for undefined in updated fn
- AttachmentsPicker - added child component updates in updated fn... removed child component updates from handleAttachmentsAdded and handleAttachmentsRemoved... removed extra ".bind(this)" from event handler fn's in render fn - AttachmentsUploader - got rid of extra check for undefined in updated fn... updated addCurrentAttachment and addFailedAttachment to remove reqquestUpdate() in favor of merging arrays instead of pushing an element into the array - Compose2 - removed extra accept properties... added maxFileSize property... added updates to child components in updated fn... added upload validation... removed updates to child components from handleAttachmentAdded and handleAttachmentsRemoved... added dropText to temba-attachments-drop-zone... added maxFileSize to temba-attachments-uploader... removed extra ".bind(this)" from event handler fn's in render fn - ContactChat - removed extra ".bind(this)" from event handler fn's in render fn - ImagePicker - removed extra dropWidth, imageWidth, and imageHeight properties... added update to child component in updated fn... removed extra ".bind(this)" from event handler fn's in render fn - Parent - moved updates to child components from firstUpdated to updated fn
Configuration menu - View commit details
-
Copy full SHA for d073aae - Browse repository at this point
Copy the full SHA d073aaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 49300f3 - Browse repository at this point
Copy the full SHA 49300f3View commit details -
- demo - re-ordered tabs and components within tabs
- AttachmentsDropZone - renamed dropText to uploadText - AttachmentsPicker - renamed dropText to uploadText... set default uploadText to '' - Compose2 - renamed dropText to uploadText... - ImagePicker - renamed dropText to uploadText... renamed getDropZoneText helper fn to getUploadText to reuse across temba-attachments-drop-zone and temba-attachments-uploader... minor maxFileSize property comment cleanup
Configuration menu - View commit details
-
Copy full SHA for ed2c815 - Browse repository at this point
Copy the full SHA ed2c815View commit details -
- AttachmentsList - removed some whitespace and some extra requestUpd…
…ate's - AttachmentsUploader - minor property cleanup - Compose2 - minor property cleanup - test-assets - removed 'no image available' jpg
Configuration menu - View commit details
-
Copy full SHA for e3bd1e0 - Browse repository at this point
Copy the full SHA e3bd1e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b833b5 - Browse repository at this point
Copy the full SHA 0b833b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 418f3d2 - Browse repository at this point
Copy the full SHA 418f3d2View commit details
Commits on Jun 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a552f1c - Browse repository at this point
Copy the full SHA a552f1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a62c7aa - Browse repository at this point
Copy the full SHA a62c7aaView commit details -
- demo index - based on property updates
- attachments - got rid of ImageType enum, ImageDimensions, AvatarDimensions, and LogoDimensions... updated validateImageDimensions to validate based on imageWidth and imageHeight - AttachmentsDropZone - renamed uploadText to uploadLabel - AttachmentsPicker - renamed uploadText to uploadLabel - AttachmentsUploader - renamed uploadText to uploadLabel - Compose2 - renamed uploadText to uploadLabel - ImagePicker - consolidated image styles into .missing-image and .attachment-image... removed imageType, renamed uploadText to uploadLabel, and added back imageWidth, imageHeight, and imageRadius properties... got rid of getImageDimensions... updated getDropZoneWidth and getUploadLabel... updated getImage to add inline border-radius, width, and height
Configuration menu - View commit details
-
Copy full SHA for e46d9a9 - Browse repository at this point
Copy the full SHA e46d9a9View commit details -
- AttachmentsPicker - removed clearing out of currentAttachments and …
…failedAttachments - Compose2 - removed clearing out of currentAttachments and failedAttachments - ImagePicker - minor updates to whitespace
Configuration menu - View commit details
-
Copy full SHA for deec29e - Browse repository at this point
Copy the full SHA deec29eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c3011e6 - Browse repository at this point
Copy the full SHA c3011e6View commit details
Commits on Jun 8, 2023
-
- demo index - added compose2 examples to compose tab
- AttachmentsPicker - moved initialization of children's component properties from updated to firstUpdated... removed failedAttachments from updated fn changes check... added deserialize and serialize fn's... - Compose2 - moved initialization of children's component properties from updated to firstUpdated... removed failedAttachments from updated fn changes check... - ImagePicker - moved initialization of children's component properties from updated to firstUpdated... removed failedAttachments from updated fn changes check... added deserialize and serialize fn's...
Configuration menu - View commit details
-
Copy full SHA for f27e158 - Browse repository at this point
Copy the full SHA f27e158View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6193c37 - Browse repository at this point
Copy the full SHA 6193c37View commit details
Commits on Jun 9, 2023
-
- added initial AttachmentsPicker unit testing
- added initial ImagePicker unit testing - replace Compose with Compose2 (renamed to Compose) and updated unit testing - todo - validation testing for Compose, AttachmentsPicker, and ImagePicker - todo - fix bug where screenshot not displaying ImagePicker success file (just need to update url to point to test-asset) - todo - fix bug where screenshot not displaying temba-field errors
Configuration menu - View commit details
-
Copy full SHA for c3e3602 - Browse repository at this point
Copy the full SHA c3e3602View commit details -
- demo index - removed extra compose2 components
- moved upload_endpoint from attachments to AttachmentsUploader - Compose - removed extra Attachment interface
Configuration menu - View commit details
-
Copy full SHA for a9dd17f - Browse repository at this point
Copy the full SHA a9dd17fView commit details
Commits on Jun 21, 2023
-
- updated attachment picker and image picker unit tests incl. screens…
…hots - removed image picker temp hack spoof code
Configuration menu - View commit details
-
Copy full SHA for eed5175 - Browse repository at this point
Copy the full SHA eed5175View commit details -
Configuration menu - View commit details
-
Copy full SHA for a84a56e - Browse repository at this point
Copy the full SHA a84a56eView commit details -
- added attachments uploader unit tests - moved getValidAttachments and getInvalidAttachments from attachments picker to attachments uploader
Configuration menu - View commit details
-
Copy full SHA for f641160 - Browse repository at this point
Copy the full SHA f641160View commit details -
Configuration menu - View commit details
-
Copy full SHA for 288e4e0 - Browse repository at this point
Copy the full SHA 288e4e0View commit details -
- updated attachments list unit tests to add screenshots for before v…
…s after removing a file
Configuration menu - View commit details
-
Copy full SHA for 4b79fc0 - Browse repository at this point
Copy the full SHA 4b79fc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7533eb - Browse repository at this point
Copy the full SHA d7533ebView commit details
Commits on Jun 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fa3cbf1 - Browse repository at this point
Copy the full SHA fa3cbf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63c2cda - Browse repository at this point
Copy the full SHA 63c2cdaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3862e8a - Browse repository at this point
Copy the full SHA 3862e8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for cae9af5 - Browse repository at this point
Copy the full SHA cae9af5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1eaf24 - Browse repository at this point
Copy the full SHA d1eaf24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e4f4f9 - Browse repository at this point
Copy the full SHA 7e4f4f9View commit details
Commits on Jun 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 96884bf - Browse repository at this point
Copy the full SHA 96884bfView commit details -
- renamed dropWidth to dropZoneWidth
- simplified image picker unit test screenshot file names - added styleMap to pull out ImagePicker .image-item styles from the render template html code - abstracted imageMargin for reuse across 1) calculating the drop zone width, and 2) styling the uploaded image (both the missing image or the uploaded one)
Configuration menu - View commit details
-
Copy full SHA for 0197815 - Browse repository at this point
Copy the full SHA 0197815View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30cc9ec - Browse repository at this point
Copy the full SHA 30cc9ecView commit details
Commits on Jun 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c698985 - Browse repository at this point
Copy the full SHA c698985View commit details