Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/pages/sidepanel/State.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const State: React.FC<React.PropsWithChildren<StateProps>> = () => {
const handleStateToggle = isActive => {
setResetSidePanel(Date.now());
extensionStateStorage.set(isActive);
if (!isActive) {
if (isActive) {
chrome.tabs.query({ active: true, currentWindow: true }, tabs => {
if (tabs.length > 0) {
chrome.tabs.reload(tabs[0].id);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/sidepanel/components/SectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const HeaderContainer = styled(Box)(({ theme }) => ({
alignItems: 'center',
gap: theme.spacing(1.25), // 10px between icon and text
height: theme.spacing(5), // 40px
padding: `${theme.spacing(1.375)} ${theme.spacing(2)} ${theme.spacing(0.875)} ${theme.spacing(3)}`, // 11px 16px 7px 24px (top right bottom left)
padding: `1.375rem ${theme.spacing(2)} ${theme.spacing(0.875)} ${theme.spacing(3)}`, // 11px 16px 7px 24px (top right bottom left)
width: '100%',
opacity: 1,
}));
Expand Down
1 change: 1 addition & 0 deletions src/pages/sidepanel/components/TabNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface TabNavigationProps {

const TabsContainer = styled(Box)(({ theme }) => ({
padding: theme.spacing(2),
paddingTop: '1.5rem', // 24px
}));

const StyledTabs = styled(Tabs)(({ theme }) => ({
Expand Down
24 changes: 12 additions & 12 deletions src/pages/sidepanel/components/TopNavigation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ describe('TopNavigation', () => {
expect(screen.getByText('Disable Extension')).toBeInTheDocument();
});

it('should render help and settings icons', () => {
renderWithTheme();
// it('should render help and settings icons', () => {
// renderWithTheme();

expect(screen.getByLabelText('help')).toBeInTheDocument();
expect(screen.getByLabelText('settings')).toBeInTheDocument();
});
// expect(screen.getByLabelText('help')).toBeInTheDocument();
// expect(screen.getByLabelText('settings')).toBeInTheDocument();
// });
});

describe('Toggle Functionality', () => {
Expand Down Expand Up @@ -123,14 +123,14 @@ describe('TopNavigation', () => {
});
});

describe('Settings Icon', () => {
it('should render settings icon with correct aria-label', () => {
renderWithTheme();
// describe('Settings Icon', () => {
// it('should render settings icon with correct aria-label', () => {
// renderWithTheme();

const settingsButton = screen.getByLabelText('settings');
expect(settingsButton).toBeInTheDocument();
});
});
// const settingsButton = screen.getByLabelText('settings');
// expect(settingsButton).toBeInTheDocument();
// });
// });

describe('Auto Detection Indicator', () => {
it('should call useAutoDetection with correct parameters', () => {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/sidepanel/components/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
IconButton,
Divider,
} from '@mui/material';
import { HelpOutline, Settings } from '@mui/icons-material';
// import { Settings } from '@mui/icons-material';
Comment thread
onkarj-47 marked this conversation as resolved.
import { HelpOutline } from '@mui/icons-material';
import Toggle from '@root/src/pages/sidepanel/components/Toggle';
import { AutoDetectionIndicator } from '@root/src/pages/sidepanel/components/AutoDetectionIndicator';
import { useAutoDetection } from '@root/src/pages/sidepanel/hooks/useAutoDetection';
Expand Down Expand Up @@ -101,7 +102,7 @@ const TopNavigation: React.FC<TopNavProps> = ({ isEnabled, onChange, domainState
<HelpOutline fontSize="medium" />
</IconButton>

<IconButton
{/* <IconButton
size="medium"
sx={{
color: theme.palette.text.secondary,
Expand All @@ -114,7 +115,7 @@ const TopNavigation: React.FC<TopNavProps> = ({ isEnabled, onChange, domainState
}}
aria-label="settings">
<Settings fontSize="medium" />
</IconButton>
</IconButton> */}
</Box>
</Toolbar>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/sidepanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BrowserRouter as Router } from 'react-router-dom';
import State from '@pages/sidepanel/State';
import { AppThemeProvider } from '@src/theme/ThemeProvider';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
// import { ReactQueryDevtools } from '@tanstack/react-query-devtools';

function init() {
const appContainer = document.querySelector('#app-container');
Expand All @@ -25,7 +25,7 @@ function init() {
<Router>
<State />
</Router>
<ReactQueryDevtools buttonPosition="top-right" />
{/* <ReactQueryDevtools buttonPosition="top-right" /> */}
</QueryClientProvider>
</AppThemeProvider>
</React.StrictMode>,
Expand Down
4 changes: 3 additions & 1 deletion src/pages/sidepanel/sections/profile/Attributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ const DescriptionText = styled(Typography)(() => ({
fontSize: appColors.common.fontSize.small,
color: appColors.neutral[300],
lineHeight: appColors.common.lineHeight.tight,
fontWeight: appColors.common.fontWeight.medium,
}));

const StyledLink = styled(Link)(() => ({
font: `${appColors.common.fontWeight.bold} 0.75rem/1.42 Inter, sans-serif`, // Bold 12px, line-height 142%
fontWeight: appColors.common.fontWeight.bold,
fontSize: appColors.common.fontSize.small,
color: appColors.common.colors.accent,
textDecoration: 'underline',
cursor: 'pointer',
Expand Down
4 changes: 3 additions & 1 deletion src/pages/sidepanel/sections/profile/Interests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const EmptyStateText = styled(Typography)(() => ({
}));

const StyledLink = styled(Link)(() => ({
font: `${appColors.common.fontWeight.bold} 0.75rem/1.42 Inter, sans-serif`, // Bold 12px, line-height 142%
fontWeight: appColors.common.fontWeight.bold,
fontSize: appColors.common.fontSize.small,
color: appColors.common.colors.accent,
textDecoration: 'underline',
cursor: 'pointer',
Expand All @@ -71,6 +72,7 @@ const ContentText = styled(Typography)(() => ({
fontSize: appColors.common.fontSize.baseSmall,
color: appColors.neutral[600],
lineHeight: appColors.common.lineHeight.tight,
fontWeight: appColors.common.fontWeight.medium,
}));

export const Interests = ({
Expand Down