Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/happy-carpets-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/ui-client': major
'@rocket.chat/i18n': major
'@rocket.chat/meteor': major
---

Promotes Resizable Contextualbars from preview state to stable.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client';
import { useLayoutSizes, useLayoutContextualBarPosition } from '@rocket.chat/ui-contexts';
import type { ComponentProps } from 'react';
import { useCallback, useRef } from 'react';
Expand Down Expand Up @@ -40,16 +39,9 @@ const ContextualbarDialog = ({ onClose, ...props }: ContextualbarDialogProps) =>

return (
<FocusScope autoFocus restoreFocus>
<FeaturePreview feature='contextualbarResizable'>
<FeaturePreviewOn>
<ContextualbarResizable defaultWidth={contextualBar}>
<Contextualbar ref={callbackRef} width='100%' position={position} {...dialogProps} {...props} />
</ContextualbarResizable>
</FeaturePreviewOn>
<FeaturePreviewOff>
<Contextualbar ref={callbackRef} width={contextualBar} position={position} {...dialogProps} {...props} />
</FeaturePreviewOff>
</FeaturePreview>
<ContextualbarResizable defaultWidth={contextualBar}>
<Contextualbar ref={callbackRef} width='100%' position={position} {...dialogProps} {...props} />
</ContextualbarResizable>
</FocusScope>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';

import CannedResponseList from './CannedResponseList';
import { Contextualbar } from '../../../../components/Contextualbar';

export default {
title: 'Omnichannel/CannedResponseList',
Expand Down Expand Up @@ -76,10 +75,4 @@ Default.args = {
itemCount: 3,
loadMoreItems: action('loadMoreItems'),
};
Default.decorators = [
(fn) => (
<Box h='600px'>
<Contextualbar>{fn()}</Contextualbar>
</Box>
),
];
Default.decorators = [(fn) => <Box height='100vh'>{fn()}</Box>];
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ exports[`CannedResponseList Storybook Stories renders Default without crashing 1
<body>
<div>
<div
class="rcx-box rcx-box--full rcx-css-1kmfepv"
class="rcx-box rcx-box--full rcx-css-llf9s1"
>
<span
data-focus-scope-start="true"
hidden=""
/>
<div
class="rcx-box rcx-box--full rcx-vertical-bar rcx-css-8umsxh"
style="position: relative; user-select: auto; width: 380px; height: 100%; max-width: 50%; min-width: 380px; min-height: 100%; box-sizing: border-box; flex-shrink: 0;"
>
<span
data-focus-scope-start="true"
hidden=""
/>
<div
aria-labelledby="contextualbarTitle"
class="rcx-box rcx-box--full rcx-vertical-bar rcx-css-1n0hsd8"
class="rcx-box rcx-box--full rcx-vertical-bar rcx-css-qtw00q"
role="dialog"
tabindex="-1"
>
Expand Down Expand Up @@ -157,11 +157,49 @@ exports[`CannedResponseList Storybook Stories renders Default without crashing 1
</div>
</div>
</div>
<span
data-focus-scope-end="true"
hidden=""
/>
<div>
<div
class=""
style="position: absolute; user-select: none; width: 100%; height: 10px; top: -5px; left: 0px; cursor: row-resize;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 10px; height: 100%; top: 0px; cursor: col-resize; right: -5px;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 100%; height: 10px; left: 0px; cursor: row-resize; bottom: -5px;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 3px; height: 100%; top: 0px; left: 0px; cursor: col-resize; z-index: 99;"
>
<div
class="rcx-box rcx-box--full rcx-css-h2r2vg"
/>
</div>
<div
class=""
style="position: absolute; user-select: none; width: 20px; height: 20px; right: -10px; top: -10px; cursor: ne-resize;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 20px; height: 20px; right: -10px; bottom: -10px; cursor: se-resize;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 20px; height: 20px; left: -10px; bottom: -10px; cursor: sw-resize;"
/>
<div
class=""
style="position: absolute; user-select: none; width: 20px; height: 20px; left: -10px; top: -10px; cursor: nw-resize;"
/>
</div>
</div>
<span
data-focus-scope-end="true"
hidden=""
/>
</div>
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import { FormProvider, useForm } from 'react-hook-form';

import { AppLogsFilterContextualBar } from './AppLogsFilterContextualBar';
import { Contextualbar } from '../../../../../../components/Contextualbar';

export default {
title: 'Marketplace/AppDetailsPage/AppLogs/Filters/AppLogsFilterContextualBar',
Expand Down Expand Up @@ -34,7 +34,7 @@ export default {

return (
<FormProvider {...methods}>
<Contextualbar height='100vh'>{fn()}</Contextualbar>
<Box height='100vh'> {fn()}</Box>
</FormProvider>
);
},
Expand Down
Loading
Loading