* Viewing Files in Edit mode in mobile with ability to delete and save
* Added upload attachment to keyboard tracker view
* using state instread of use ref
* Minor
* Added tests
* intl extract
* new function getFiles
ById, batch file deletion and tests
* Files fetching in edit options and tests
* Removed DeviceEventEmitter and used React context
* Added support to check minimum required version to show edit file attachments
* resolve forward ref issue
* Minor
* memotized props for context and observe config with value
* Import fixes
* feat: added new check for isAudio and added the supported mime types
* feat: adding the progress and audio on the audio file message
* feat: finishing the layout of the audio_file
* feat: play and pause audio
* feat: update the progress bar when audio is playing
* feat: update the timeframe of the audio
* feat: update with the new design
* feat: adding download and preview
* feat: creates a hook for the file download and preview
* feat: adding useCallback to make the return stable
* fix: iOS issue when playing in loop
* feat: adding localization for the error
* fix: removing code tha was inserted for debug
* feat: add a new line on the en.json
* fix: fixing types
* feat: adding the onSeek method inside the progress bar
* feat: changing progress value to animated value
* feat: changing to GestureDetector and making the seek method work
* feat: adding a touchable without feedback to prevent the audio to triggering other page
* feat: adding the drag on the seek method
* feat: making the download button more gray
* fix: fix tests
* fix: prevent onProgress from clearing the seconds when the audio is paused
* feat: clamping the position of the cursor to never be dragged offscreen
* feat: enhancing the experience of dragging the cursor on the progress bar
* feat: differentiate between the throttles
* feat: remvoing the aac audio files support
* feat: pausing if the focus has changed
* feat: render differently the audio file when in the files list
* refactor: optimize audio file component by using useCallback for event handlers
* refactor: extract stopPropagation function for better readability in AudioFile component
* feat: implement custom useThrottled hook and replace lodash throttle in AudioFile component
* refactor: update useThrottled hook to accept a generic callback type
* fix: loading of uri of audio files after merge
* feat: add audioFile style to enhance layout for audio files
* fix: tests
* refactor: started with draft, done until new tabs for draft
* refactor: change the query and added the screen for draft
* added condition for fetching draft for channel delete or not
* refactor: added draft screen
* linter fixes
* Added draft post component
* added avatar and header display name for the draft post list
* added channel info component
* channel info completed
* proper naming
* added image file markdown acknowledgement support
* draft actions
* Fix the draft receiver in drafts
* separated send message handler
* Done with send drafts
* done with delete drafts
* change save to send draft
* handle lengthy message with show more button
* done with persistent message edit, send and delete drafts
* added alert for sending message
* added update at time for the drafts
* en.json extract fix
* Updated dependencies for useCallback
* refactor: added drafts list to animated list
* added swipeable component and delete conformation for drafts
* done with rendering of images in markdown for drafts
* en.json issue fixed
* fix en.json issue
* refactor: en.json fix
* addressed review comments
* updated image metadata handling code
* linter fixes
* added the empty draft screen
* linter fix
* style fix
* back button an android takes to the channel list page
* en.json fix
* draft actions theme compatible
* CSS fix for draft channel_info and avatar component
* removed the badge icon and change font style drafts
* fix send alert sender name for GMs
* updated snapshot
* added testId to the drafts components
* updated send draft test id
* clicking on draft takes to the channel
* Added toptip for draft tours
* intl extract
* Rebase to main and reverted local testing changes
* Added tooltip for drafts
* addressed review comments
* reset navigation when click on a draft in draft tabs
* fix the theme issue and navigation issue
* reverted back the draft click navigation changes
* observing draft when hitting back button
* removed the unwanted animiation
* updated regex for parsing markdown
* removed unnecessary checks and change folder name
* removed react memo and merge unwanted observes function
* removed unnecessary comments
* changed the name for observing and querying draft function
* removed memo from component level
* Text to FormattedText component
* Text to formatted text, change image name
* added confirmation modal for deleting draft from bottomsheet
* using common send_handler for both draft and post
* removed magic number for tooltip and bottomsheet
* renamed channel_info to draft_post_header
* text to formattedText for Edit drafts
* removed unnecessary changes
* minor fixes
* mounting draft only when there is draft
* map to reduce
* renamed SwipeableDraft to DraftSwipeAction
* name fixes
* isValidUrl to isParsableUrl and added test
* added test and addressed minor review comments
* added inline component for the duplicate code
* inlt fixes
* clearDraft is not optional
* optimised categories_list.tsx component
* Swipeable to ReanimatedSwipeable, TouchableWithoutFeedback to Pressable and folder name changes
* Added comment and disabled eslint rule for showing warning
* fixed component file name
* minor'
* Removed deprecated Animated createAnimatedComponent flatlist
* added test for missing protocol check
* import change for SwipeableMethod
* active tab for tablet view
* Updated the drafts icons
* Updated compass-icon version to v0.1.48
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* captions on videos from posts and searches
* add the patch for react-native-video which fixes subtitle downloading
* improve spacing
* fix patch file
* upgrade compass-icons; use cc icon
* revert patch overwrite
* fix patch
* use useMemo
* fix hitslops on pressables
* use new Caption format; refactor for clarity
* simplify tracks creation and use
* feat: reducing the padding/margins of tabs and filter icons on the Search Page
* feat: adds the results text inside the post_results and file_results
* feat: changes search results to use translation
* feat: updates text on search results to use FormattedText
* feat: removing text wrapper
* feat: removing margins and using an ItemSeparator to separate the rows of the file results
* feat: refactor spacing on post results and unnecessary top
* review: externalizing Separator on the file_results
* feat: add marginTop in all File components used inside the <Files> component
* Restyle video playback error
* video not shown when attached with multiple files and thumb fails
* update local path when saving and sharing a file
* feedback review
* add observables for search component
add loader screen
add file client searches for files
* hook up loader component for loading state
* search results with found posts now working
* get and store files when searching
* query file results from the database
display dummy file text for now
* add filter screen and icon to the results header
* needs some cleanup but functionally works
- applied filters reduce files to subset of selectd types
- no filters will show all files
* update number files in parenthesis to match the filtered number of files
(if filtered)
* added the missing file extensions found in webapp
added document_types which is a superset of other types
* remove clear all text from filter and from bottom_sheet component
* checkin before merge latest gekidou branch
- change filters to use latest figma design
- from multiselect to single select
- revert changes to bottom sheet content that allowed adding a RHS title button
- start of the file attachement cards show in file results
* Cleanup and fixes
* Remove nested scroll views
* Address feedback
* Address feedback
* extract the fileInfos from the results object, from an array
* add translations for filters
* add translations
* use Object values to determine if has file info results
* Combine fetch recent mentions and search for posts
* add search icon back to home screen
* remove unused function import
* fix formatting and add 3 dot onPress option
* don't show search button
* Add touchable opacity for pressing the card
Add function for opening gallery
Fix `...` so only clicking directly over it calls it's function. Everywhere else calls open gallery
* place compassIcon in a touchable and add hitslop
create individual objects for flex column and row
* use one-liner for text
move constant outside of the component
* truncate filename if over max filename lenght and append ...
fix style for filename
* remove all commented filetype code. This will not be added to the card
because of added length to second row. Feedback from UX discussion
* remove trimFileName function and MAX_FILENAME_LENGTH constant
make the textContainer grow in width. The other flex boxes are constant width
align main container center and remove vertical margins
* create TabTypes contant and TabType Type to replace all uses of 'messages' and
'files'
* make padding adjustments based on the selected tab and if there are
results.
When no results are shown, we want the 'Check the spelling or try
another search' text to not move or flicker when switching between files
and messages
* put the margin on the touchable container, not the compassicon so the
hitslop is relative to the compassicon.
* Add the channel name to the filecard.
each fileInfo from the server contain a channel_id. Add to the reponse type
* Move the channel name to a separate line
* implement changes from PR. Shrink channel name when it doesn't fit
* use a useMemo instead of useCallback
* initial implementation
* keep the bottomsheet open until successful download
* remove comment
* initial commit
* don't use raw object values
* channel_id will be defined
* remove shadows
update channel name text
* move file_options to it's own folder
add checks for enabled downloading and public links
* - when touching each menu item, extend the area horizontally so the edge
of the icon has space between it and the touchable area.
- don't dismiss the modal. allow the user to dismiss or choose another
option.
- adjust the horizontal spacing of the toast
origin/MM-44939-file-options
* adjust margin so holding down on a menuItem spans the width of the
bottom sheet
* working copy using the File component instead of creating a new FileCard
component
* add styhling for long channel name
* update styling for info text
* update styling
* disable lint check for console statement until function is hooked up
* fixt linting errors caused by api including channel_id. It needs to be
optional or the model will complain
* when a file is an image, show the image or video as an image instead of
the generic file icon
* make `asCard` File Prop optional
* shift the image icon over 4px
* tweaked styles
* tweaked styles for file info
* move files directory from inside the post_list/post/body/ folder to its
own component because is it referenced from other screens and components
including:
app/components/post_draft/uploads/upload_item/index.tsx
app/components/post_list/post/body/content/image_preview/image_preview.tsx
app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
app/components/post_list/post/body/index.tsx
app/screens/gallery/document_renderer/document_renderer.tsx
app/screens/home/search/results/results.tsx
* create useImageAttachments hook and share with files component and
results
* rename all renderXXXFile useMemo options to xxxFile. These return the
actual component
* use explicit Boolean(onOptionsPress)
* isSingleInput does not need to be a function
* use find instead of filter().map()
* add dependencies and refactor to reduce some file dependency arrays
* order files by reverse create_at date
* remove console.log and leave as a comment for now
* update styling so that the view wrapper has the borderRadius. Now
android and ios get the correct borderRadius surrounding the channel
name
* initial implementation
* keep the bottomsheet open until successful download
* remove comment
* move file_options to it's own folder
add checks for enabled downloading and public links
* remove shadows
update channel name text
* - when touching each menu item, extend the area horizontally so the edge
of the icon has space between it and the touchable area.
- don't dismiss the modal. allow the user to dismiss or choose another
option.
- adjust the horizontal spacing of the toast
origin/MM-44939-file-options
* adjust margin so holding down on a menuItem spans the width of the
bottom sheet
* delete file
* - use OptionItem instead of MenuItem
- show the actual image for images and video
* update results to use sorted filesForGallery file_options click gets the
correct file
* use the results of the ordered useImageAttachements results as data for
File and Gallery
* remove unnecessary View
* - create snappoints based on number of OptionItems and the header height
- adjust the toast according to the number of items shown
- show and hide items when canDownload and publicLinksEnabled
- bottom sheet will not resize because it is a function, but will show
and hide items when enabled/disabled
* results does not need to know about the toast margin in FileOption
* extend optionItem to extende to edges of the bottom screen
* When canDownloadFiles or publicLinksEnabled, reopen the bottom sheet
with the correct options available
* initialize lastViewedIndex to undefined with FileOptions first opens
* remove extra empty line
* open the permalink view when select Open in Channel
* PR feedback
- rename capitalize const
- add several useCallbacks
- use typescript optional parareter instead of if statement
* - remove useMemos that only return a component
- fix bug - when channel name is not present, don't show the channel
component. This happened when looking at posts in a channel because
post comes from the model, which does not include the channelName.
This is because in the channel view all images are in a specific
channel and no need to store it
* remove useMemo import
* remove callback
* - remote unused operator
- nothing needed outside of try catch
* remove unused Client import
* s/xxxFile/renderXxxFile/ because theare are a function that returns a
component
* move constant above component
* default to 0 instead of forcing to be defined
* - remove useMemo for renderIcon. It only returns a component
- remove async from useCallback for handle functions
* - do not modify the file value directly
- handle the case where the only open the bottom sheet if it was open at
the time of the dependencies changing
* use optional operator
* convert to switch statement
* let the parmalink handle what to do when called.
* just use the post id from fileInfo
* use observerConfigBoolean
* import as type because not useing to construct as models
* add links to Jira ticket and github PR
* add line breaks and sort alphabetically
* use ternary operator to reduce number of lines
* move up as far as possible
* remove unused style
* sort props and input vars alphabetically
* move higher in the component
* return ealier
* no need for useDerivedValue. useMemo instead
* use useCallback
* remove unused constant
* replace any with type
* use more specific dependency
* remove memoization. fileInfo will not change because it is passed from
a server call and will not update unless a new search is created (with
this modal closed)
* no need to memoize. SetValue is already memoized because of useState
* use observeConfigBooleanValue to get config values
* add comment explaining the purpose of the useEffect
* Merge fixes and minor tweaks
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* add observables for search component
add loader screen
add file client searches for files
* hook up loader component for loading state
* search results with found posts now working
* get and store files when searching
* query file results from the database
display dummy file text for now
* add filter screen and icon to the results header
* needs some cleanup but functionally works
- applied filters reduce files to subset of selectd types
- no filters will show all files
* update number files in parenthesis to match the filtered number of files
(if filtered)
* added the missing file extensions found in webapp
added document_types which is a superset of other types
* remove clear all text from filter and from bottom_sheet component
* checkin before merge latest gekidou branch
- change filters to use latest figma design
- from multiselect to single select
- revert changes to bottom sheet content that allowed adding a RHS title button
- start of the file attachement cards show in file results
* Cleanup and fixes
* Remove nested scroll views
* Address feedback
* Address feedback
* extract the fileInfos from the results object, from an array
* add translations for filters
* add translations
* use Object values to determine if has file info results
* Combine fetch recent mentions and search for posts
* add search icon back to home screen
* remove unused function import
* fix formatting and add 3 dot onPress option
* don't show search button
* Add touchable opacity for pressing the card
Add function for opening gallery
Fix `...` so only clicking directly over it calls it's function. Everywhere else calls open gallery
* place compassIcon in a touchable and add hitslop
create individual objects for flex column and row
* use one-liner for text
move constant outside of the component
* truncate filename if over max filename lenght and append ...
fix style for filename
* remove all commented filetype code. This will not be added to the card
because of added length to second row. Feedback from UX discussion
* remove trimFileName function and MAX_FILENAME_LENGTH constant
make the textContainer grow in width. The other flex boxes are constant width
align main container center and remove vertical margins
* create TabTypes contant and TabType Type to replace all uses of 'messages' and
'files'
* make padding adjustments based on the selected tab and if there are
results.
When no results are shown, we want the 'Check the spelling or try
another search' text to not move or flicker when switching between files
and messages
* put the margin on the touchable container, not the compassicon so the
hitslop is relative to the compassicon.
* Add the channel name to the filecard.
each fileInfo from the server contain a channel_id. Add to the reponse type
* Move the channel name to a separate line
* implement changes from PR. Shrink channel name when it doesn't fit
* use a useMemo instead of useCallback
* initial commit
* working copy using the File component instead of creating a new FileCard
component
* add styhling for long channel name
* update styling for info text
* update styling
* disable lint check for console statement until function is hooked up
* fixt linting errors caused by api including channel_id. It needs to be
optional or the model will complain
* when a file is an image, show the image or video as an image instead of
the generic file icon
* make `asCard` File Prop optional
* shift the image icon over 4px
* tweaked styles
* tweaked styles for file info
* move files directory from inside the post_list/post/body/ folder to its
own component because is it referenced from other screens and components
including:
app/components/post_draft/uploads/upload_item/index.tsx
app/components/post_list/post/body/content/image_preview/image_preview.tsx
app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
app/components/post_list/post/body/index.tsx
app/screens/gallery/document_renderer/document_renderer.tsx
app/screens/home/search/results/results.tsx
* create useImageAttachments hook and share with files component and
results
* rename all renderXXXFile useMemo options to xxxFile. These return the
actual component
* use explicit Boolean(onOptionsPress)
* isSingleInput does not need to be a function
* use find instead of filter().map()
* add dependencies and refactor to reduce some file dependency arrays
* order files by reverse create_at date
* remove console.log and leave as a comment for now
* update styling so that the view wrapper has the borderRadius. Now
android and ios get the correct borderRadius surrounding the channel
name
* use the results of the ordered useImageAttachements results as data for
File and Gallery
* remove extra empty line
* PR feedback
- rename capitalize const
- add several useCallbacks
- use typescript optional parareter instead of if statement
* - remove useMemos that only return a component
- fix bug - when channel name is not present, don't show the channel
component. This happened when looking at posts in a channel because
post comes from the model, which does not include the channelName.
This is because in the channel view all images are in a specific
channel and no need to store it
* remove useMemo import
* remove callback
* - remote unused operator
- nothing needed outside of try catch
* remove unused Client import
* s/xxxFile/renderXxxFile/ because theare are a function that returns a
component
* move constant above component
* default to 0 instead of forcing to be defined
* use observerConfigBoolean
* import as type because not useing to construct as models
* add links to Jira ticket and github PR
* add line breaks and sort alphabetically
* use ternary operator to reduce number of lines
* move up as far as possible
* remove unused style
* sort props and input vars alphabetically
* move higher in the component
* return ealier
* no need for useDerivedValue. useMemo instead
* use useCallback
* Minor tweaks and fixes
* Remove floats from style
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>