Commit c97e8c8a authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Remove dependency on rounded_corners feature flag

parent 846a18ff
import classnames from 'classnames';
import { useEffect, useLayoutEffect, useMemo } from 'preact/hooks';
import { useEffect, useMemo } from 'preact/hooks';
import { confirm } from '../../shared/prompts';
import type { SidebarSettings } from '../../types/config';
......@@ -49,20 +49,6 @@ function HypothesisApp({
const route = store.route();
const isModalRoute = route === 'notebook' || route === 'profile';
const roundedCornersEnabled = store.isFeatureEnabled('rounded_corners');
useLayoutEffect(() => {
const html = document.querySelector('html');
html?.style.setProperty(
'--h-border-radius',
roundedCornersEnabled ? '0.25rem' : null,
);
html?.style.setProperty(
'--h-border-radius-lg',
roundedCornersEnabled ? '0.5rem' : null,
);
}, [roundedCornersEnabled]);
const backgroundStyle = useMemo(
() => applyTheme(['appBackgroundColor'], settings),
[settings],
......
......@@ -142,24 +142,6 @@ describe('HypothesisApp', () => {
});
});
[true, false].forEach(roundedCornersEnabled => {
it('defines border-radius CSS vars when the feature flag is enabled', () => {
fakeStore.isFeatureEnabled.returns(roundedCornersEnabled);
createComponent();
const styles = document.querySelector('html')?.style;
assert.equal(
styles.getPropertyValue('--h-border-radius'),
roundedCornersEnabled ? '0.25rem' : '',
);
assert.equal(
styles.getPropertyValue('--h-border-radius-lg'),
roundedCornersEnabled ? '0.5rem' : '',
);
});
});
describe('auto-opening tutorial', () => {
it('should open tutorial on profile load when criteria are met', () => {
fakeShouldAutoDisplayTutorial.returns(true);
......
......@@ -9,14 +9,4 @@ export default {
// This module references `sidebar-frame` and related classes
'./src/annotator/sidebar.{js,ts,tsx}',
],
theme: {
extend: {
borderRadius: {
// Equivalent to tailwind defaults, but overriding values from frontend-shared preset
// Once the preset stops defining borderRadius, we can remove this
DEFAULT: '0.25rem',
lg: '0.5rem',
},
}
}
};
......@@ -24,6 +24,12 @@ export default {
'pulse-fade-out': 'pulse-fade-out 5s ease-in-out forwards',
'slide-in-from-right': 'slide-in-from-right 0.3s forwards ease-in-out',
},
borderRadius: {
// Equivalent to tailwind defaults, but overriding values from frontend-shared preset
// Once the preset stops defining borderRadius, we can remove this
DEFAULT: '0.25rem',
lg: '0.5rem',
},
boxShadow: {
// A more prominent shadow than the one used by tailwind, intended for
// popovers and menus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment