App icon indicating copy to clipboard operation
App copied to clipboard

Modal animation is inconsistent

Open parasharrajat opened this issue 5 years ago • 31 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


The following things need to be fixed:

  1. Search page Animations.
  2. New Group page Animations.
  3. New Chat Page Animations.
  4. Settings Page Animations.
  5. IOU Modal Page Animations.

Expected Result:

Animations for all the models & EMOJI Picker should be smooth.

Actual Result:

When we close RightSiderbarModal (All the Pages mentioned above), it quickly closes but the opening animation is very smooth. Sometimes, Modals are open suddenly without animation.

Action Performed:

  1. Click search which opens the search modal and notices the Opening animation.
  2. Now close the modal, Modal closes quickly.

Workaround:

Does not affect functionality.

Platform:

Web - :heavy_check_mark: iOS - :heavy_check_mark: Android - :heavy_check_mark: Desktop App - :heavy_check_mark: Mobile Web - :heavy_check_mark:

Version Number: Latest Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/24370807/114252237-d10d9c00-99c1-11eb-872f-adfe42a34751.mp4

Other Video

https://expensify.slack.com/files/U01J5Q81BRP/F01SZK4SMGT/5e8bd204-81ec-4646-8d02-948b7b8048e3.webm

Expensify/Expensify Issue URL:

parasharrajat avatar Apr 10 '21 00:04 parasharrajat

Thanks for reporting @parasharrajat and for the thorough details above!
@Expensify/design can I get 👀 before assigning to a triager to make sure there's not something I'm missing and/or to get any thoughts/ideas. I checked both repos for similar issues and couldn't find

mallenexpensify avatar Apr 14 '21 22:04 mallenexpensify

nothing really to add for me. I notice how abrupt the exit is and while I don't think it should linger or anything, a more smoother transition when closing would be a great improvement.

megankelso avatar Apr 14 '21 22:04 megankelso

Yeah, my only comment is that all modal animations should look and feel exactly the same. Right now, all three actions seem different? Correct me if I'm wrong, maybe the recording distorts this.

michelle-thompson avatar Apr 14 '21 22:04 michelle-thompson

Yeah, I share the same sentiment as Megan and Michelle. Let's try to standardize on the same exact modal animation (smoothly animates in, smoothly animates out) everywhere. It seems like from the screen recording we have a different animation for search than from Settings.

shawnborton avatar Apr 14 '21 22:04 shawnborton

@parasharrajat this is an issue we'd like to fix. I've outlined the deliverables below, if you would like to work on it can you please propose a solution and I'll assign an engineer to review? The job will pay $250 (plus $150 bonus for reporting the issue and creating this GH). A job will be created in Upwork once I hear back from you.

  • Update modal animation when clicking the 🔍
  • Update modal animation when clicking the Global Create (green plus button in bottom left) to start a New Chat
  • Update modal animation when clicking the Global Create (green plus button in bottom left) to start a New Group
  • Base all of the above off the current modal animation that happens when you click the user icon/avatar at the top to open Settings and the X in Settings to close it.

mallenexpensify avatar Apr 14 '21 23:04 mallenexpensify

@mallenexpensify Sorry for the delayed response. Yeah, I would like to work on this.

Proposal

Exit Animation for Modal

  1. It is not smooth as we are running the translation for complete screen width instead it should run only for sidebar width. https://github.com/Expensify/Expensify.cash/blob/e7330c4b5c722eca9fea4f75ac3051edf187e4bd/src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js#L10-L15 which should be
const translateX = Animated.multiply(progress.interpolate({
        inputRange: [0, 1],
        outputRange: [isSmallScreen ? screen.width : variables.sideBarWidth, 0],
        extrapolate: 'clamp',
    }), inverted);

Entry animation breaks sometimes.

  1. We have discussed this thing already and we want to roll out this for the whole app. What happens is when we focus on any input immediately while we run any animation, it causes the Animation to break. know more To fix this: We have to apply the focus only after Interactions are finished. thus we would be wrapping the manual focus logic into Interaction Manager, something like this.
  componentDidMount() {
        InteractionManager.runAfterInteractions(() => {
            this.textInput.focus();
        });
    }

This fixes the problem at the root. Other than this I have not noticed any glitches, if there are I would tackle them too.

Questions

Base all of the above off the current modal animation that happens when you click the user icon/avatar at the top to open Settings and the X in Settings to close it.

Could you please help me understand this?

parasharrajat avatar Apr 15 '21 17:04 parasharrajat

@parasharrajat Re:

Base all of the above off the current modal animation that happens when you click the user icon/avatar at the top to open Settings and the X in Settings to close it.

  • Could you please help me understand this?

We would like the three update bullet point requests to be animated to function the same (or very similar?) as "the current modal animation that happens when you click the user icon/avatar at the top to open Settings and the X in Settings to close it." Maybe the 'fix' is just reusing the code for opening/closing settings? (NOT an engineer, just guessing...)

mallenexpensify avatar Apr 15 '21 22:04 mallenexpensify

@mallenexpensify Alright. Will be done.

parasharrajat avatar Apr 15 '21 23:04 parasharrajat

I need to assign an engineer to review your proposal, do you want me to do that now to review your post above or do you want to update anything before I do?

mallenexpensify avatar Apr 15 '21 23:04 mallenexpensify

@mallenexpensify The above proposal is still valid. Please go ahead.

parasharrajat avatar Apr 15 '21 23:04 parasharrajat

Triggered auto assignment to @thienlnam (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Apr 18 '21 15:04 MelvinBot

@thienlnam Any feedback on the above proposal?

parasharrajat avatar Apr 19 '21 22:04 parasharrajat

@thienlnam just letting you know that you should not review this proposal and only triage to see if this is an External issue (looks like it is) then add the External label. Once it has an Exported label then someone will be assigned to review the proposal.

marcaaron avatar Apr 20 '21 00:04 marcaaron

Triggered auto assignment to @mitchexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Apr 20 '21 16:04 MelvinBot

Hey @parasharrajat! I've gone ahead and created the Upwork job and hired you for it. I've set the price at $400 ($250 + $150 bonus for reporting the issue and creating this GH) which will be paid 7 days after merge

Thanks!

MitchExpensify avatar Apr 20 '21 23:04 MitchExpensify

Should Exported have assigned someone to review the proposal @marcaaron ?

MitchExpensify avatar Apr 20 '21 23:04 MitchExpensify

Yeah it probably didn't because @thienlnam is still assigned.

marcaaron avatar Apr 21 '21 00:04 marcaaron

Triggered auto assignment to @Luke9389 (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Apr 21 '21 00:04 MelvinBot

I noticed that the emoji picker doesn't have animations. Would be good to add it.

puneetlath avatar Apr 21 '21 14:04 puneetlath

Sure @puneetlath I will pull the latest code in and add animation there.

parasharrajat avatar Apr 21 '21 14:04 parasharrajat