Skip to content

Commit

Permalink
feat: removed scroll beahviour for ZOOMED FULL BODY
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepat0 committed Oct 18, 2024
1 parent 5d20da7 commit e301761
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
11 changes: 10 additions & 1 deletion src/components/layouts/ZoomedFullBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import Spin from '../ui/Spin';
import { LayoutProps } from '../MemoriWidget/MemoriWidget';

Expand All @@ -21,6 +21,15 @@ const ZoomedFullBodyLayout: React.FC<LayoutProps> = ({
loading = false,
poweredBy,
}) => {

useEffect(() => {
document.body.style.overflow = 'hidden';
return () => {
document.body.style.overflow = '';
};
}, []);


return (
<>
{integrationStyle}
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/zoomed-full-body.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.memori--grid-column--zoomed-full-body {
max-height: calc(100% - 80px) !important;
max-height: calc(100% - 110px) !important;
}

.memori.memori-widget.memori-layout-zoomed_full_body .memori--grid {
Expand Down
4 changes: 2 additions & 2 deletions src/context/visemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const VISEME_MAP: { [key: number]: string } = {
const DEFAULT_VISEME_DURATION = 0.04; //0; // Reduced from 0.4 for smoother transitions
const VISEME_OVERLAP = 0.02; // Slightly increased from 0.04 for more overlap
const SMOOTHING_FACTOR = 0.35; // New constant for weight smoothing
const TIME_OFFSET = -0.02; // Adjust this value as needed (in seconds)
const PRELOAD_TIME = 0.5; // Preload visemes 0.5 seconds in advance
const TIME_OFFSET = 0; // Adjust this value as needed (in seconds)
const PRELOAD_TIME = 1; // Preload visemes 0.5 seconds in advance

export const VisemeProvider: React.FC<{ children: React.ReactNode }> = ({
children,
Expand Down
47 changes: 43 additions & 4 deletions src/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,25 @@ export const Anonymous = Template.bind({});
Anonymous.args = {
ownerUserName: 'nzambello',
memoriName: 'Nicola',
tenantID: 'aisuru.com',
tenantID: 'www.aisuru.com',
engineURL: 'https://engine.memori.ai',
apiURL: 'https://backend.memori.ai',
baseURL: 'https://www.aisuru.com',
uiLang: 'it',
showShare: true,
showSettings: true,
uiLang: 'IT',
spokenLang: 'IT',
layout: 'ZOOMED_FULL_BODY',
showInstruct: 'false',
showSettings: 'true',
showClear: 'false',
showAIicon: 'true',
showWhyThisAnswer: 'true',
showTypingText: 'false',
showOnlyLastMessages: 'false',
showTranslationOriginal: 'false',
showCopyButton: 'false',
showShare: 'true',
showLogin: 'false',
enableAudio: 'true',
};

export const Localhost = Template.bind({});
Expand Down Expand Up @@ -138,6 +151,32 @@ GiovannaProva.args = {
initialQuestion: 'inizio simulazione',
};

export const NunzioFiore = Template.bind({});
NunzioFiore.args = {
ownerUserName: 'nunzio.fiore',
memoriName: 'Nunzio',
tenantID: 'www.aisuru.com',
engineURL: 'https://engine.memori.ai',
apiURL: 'https://backend.memori.ai',
baseURL: 'https://www.aisuru.com',
uiLang: 'IT',
spokenLang: 'IT',
layout: 'ZOOMED_FULL_BODY',
showInstruct: 'false',
showSettings: 'true',
showClear: 'false',
showAIicon: 'true',
showWhyThisAnswer: 'true',
showTypingText: 'false',
showOnlyLastMessages: 'false',
showTranslationOriginal: 'false',
showCopyButton: 'false',
showShare: 'true',
showLogin: 'false',
enableAudio: 'true',
};


const TemplateWithBatchButton: Story<Props> = args => (
<div>
<button
Expand Down

0 comments on commit e301761

Please sign in to comment.