-
Notifications
You must be signed in to change notification settings - Fork 6
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
video insertion now works on the Add Notes screen #188
base: main
Are you sure you want to change the base?
Conversation
@@ -63,6 +63,14 @@ describe('AddNoteScreen', () => { | |||
expect(getByTestId('RichEditor')).toBeTruthy(); | |||
}); | |||
|
|||
it('renders the save button', () => { | |||
const routeMock = { params: { untitledNumber: 1 } }; | |||
const { getByTestId } = render(<AddNoteScreen route={routeMock as any} />); |
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 job leaving a test
lib/screens/AddNoteScreen.tsx
Outdated
// Append the video to the existing content | ||
editor.setImage(videoUri); | ||
|
||
editor.injectCSS(` |
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 comment is helpful!
lib/screens/AddNoteScreen.tsx
Outdated
|
||
editor.injectCSS(` | ||
video { | ||
width: 100px !important; |
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.
Why did we have to change the height and width? and Should this be in a styles thing?
@AmarHadzic You are halfway there. I found some issues with your code, and I will provide screenshots of each issue below. issue 1: ![]() issue 2: Your output on Android: ![]() Expected output: |
Fixes #186
What was changed
The result of this PR is that it allows users to insert videos into their notes on the Add Notes screen. This results in a positive and enjoyable user experience.
Why was it changed
Currently, the "Add Notes" page does not allow users to attach videos to their notes, causing a poor user experience. With this change, users will be able to attach videos to notes, giving the user more flexibility and usability of the notes feature. Important to note that the Rich Text Editor was migrated to 10Tap. So this change was necessary for the videos to be able to be attached to notes.
How was it changed
In the
addVideoToEditor
,editor.setImage()
function was used to insert a video into the notes.editor.injectCSS()
was used to inject css styling to the video to make it 100px by 100px.UI after changes
