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
7 changes: 4 additions & 3 deletions .github/hooks/commit-msg.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fi
if [ ! -z "$third_line" ]; then
if [[ "$third_line" =~ ^(refs|ref:) ]]; then
echo -e "${red}Error: Third line should not start with 'refs' or 'ref:'${no_color}" >&2
echo -e "Use 'ref <issue link>', 'fixes <issue link>', or 'closes <issue link>' instead" >&2
echo -e "Use a supported keyword like 'ref', 'close', 'fixes', 'related to', or 'contributes to' followed by an issue link (or 'no ref')" >&2
echo -e "${yellow}Press Enter to edit the message...${no_color}" >&2
read < /dev/tty # Wait for Enter key press from the terminal

Expand Down Expand Up @@ -67,8 +67,9 @@ if [ ! -z "$third_line" ]; then
# If fixed, the script will continue to the next checks
fi

if ! [[ "$third_line" =~ ^(ref|fixes|closes)\ .*$ ]]; then
echo -e "${yellow}Warning: Third line should start with 'ref', 'fixes', or 'closes' followed by an issue link${no_color}" >&2
if ! [[ "$third_line" =~ ^(close|closes|closed|closing|fix|fixes|fixed|fixing|resolve|resolves|resolved|resolving|complete|completes|completed|completing|ref|references|part\ of|related\ to|contributes\ to|towards)\ .*$ ]] \
&& ! [[ "$third_line" == "no ref" ]]; then
echo -e "${yellow}Warning: Third line should start with a supported issue-link keyword (for example: 'ref', 'close', 'fixes', 'related to', or 'contributes to') or be 'no ref'${no_color}" >&2
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,17 @@ const Access: React.FC<{ keywords: string[] }> = ({keywords}) => {
const form = (
<SettingGroupContent className='gap-y-4' columns={1}>
{isTrialMode && (
<Banner className='mb-2 flex w-full cursor-default flex-col gap-4 border-0 p-6 pt-5 transition-none hover:translate-y-0 hover:scale-100 hover:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_28%),7px_6px_42px_8px_rgb(202_103_255_/_32%)] md:flex-row md:items-center md:justify-between dark:hover:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_36%),7px_6px_42px_8px_rgb(202_103_255_/_38%)]' size='lg' variant='gradient'>
<div>
<div className='text-base font-semibold'>Pre-launch mode</div>
<div className='mt-2 text-gray-700'>
During your free trial, a private access code is required to browse your site. When you&apos;re ready to launch, pick a plan to upgrade your account and make everything public.
<div className='-m-5 overflow-hidden p-5'>
<Banner className='mb-2 flex w-full cursor-default flex-col gap-4 border-0 p-6 pt-5 transition-none hover:translate-y-0 hover:scale-100 hover:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_28%),7px_6px_42px_8px_rgb(202_103_255_/_32%)] md:flex-row md:items-center md:justify-between dark:hover:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_36%),7px_6px_42px_8px_rgb(202_103_255_/_38%)]' size='lg' variant='gradient'>
<div>
<div className='text-base font-semibold'>Pre-launch mode</div>
<div className='mt-2 text-gray-700'>
During your free trial, a private access code is required to browse your site. When you&apos;re ready to launch, pick a plan to upgrade your account and make everything public.
</div>
</div>
</div>
<ShadeButton className='shrink-0 self-start md:self-center' asChild><a href="#/pro/billing/plans">Upgrade now</a></ShadeButton>
</Banner>
<ShadeButton className='shrink-0 self-start md:self-center' asChild><a href="#/pro/billing/plans">Upgrade now</a></ShadeButton>
</Banner>
</div>
)}
<div className="flex flex-col content-center items-center gap-4 md:flex-row">
<div className="w-full max-w-none min-w-[160px] md:w-2/3 md:max-w-[320px]">Who should be able to browse your site?</div>
Expand Down Expand Up @@ -310,7 +312,6 @@ const Access: React.FC<{ keywords: string[] }> = ({keywords}) => {
keywords={keywords}
navid='members'
saveState={saveState}
styles={isTrialMode ? 'overflow-hidden' : undefined}
testId='access'
title='Access'
hideEditButton
Expand Down
33 changes: 33 additions & 0 deletions apps/admin-x-settings/test/acceptance/membership/access.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,39 @@ test.describe('Access settings', async () => {
await expect(accessCode).toHaveValue('fake-456');
});

test('Does not clip dropdown options off the Access card in pre-launch mode', async ({page}) => {
await mockApi({page, requests: {
...globalDataRequests,
browseConfig: createConfigWithLimits({
publicSiteAccess: {
disabled: true,
error: 'This plan does not include public site access'
}
})
}});

await page.goto('/');

const section = page.getByTestId('access');

await expect(section.getByText('Pre-launch mode')).toBeVisible();

await section.getByTestId('commenting-select').click();

const lastOption = page.locator('[data-testid="select-option"]', {hasText: 'Nobody'});
await expect(lastOption).toBeVisible();

const box = await lastOption.boundingBox();
expect(box).not.toBeNull();

const optionIsActuallyPainted = await page.evaluate(({x, y, width, height}) => {
const el = document.elementFromPoint(x + width / 2, y + height / 2);
return Boolean(el?.closest('[data-testid="select-option"]'));
}, box!);

expect(optionIsActuallyPainted).toBe(true);
});

test('Disables other sections when signup is disabled', async ({page}) => {
const {lastApiRequests} = await mockApi({page, requests: {
...globalDataRequests,
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

<link rel="shortcut icon" href="assets/img/favicon.ico" />
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.png" />
<link rel="shortcut icon" href="./src/assets/img/favicon.ico" />
<link rel="apple-touch-icon" href="./src/assets/img/apple-touch-icon.png" />
</head>
<body class="react-admin">
<div id="ember-alerts-wormhole"></div>
Expand Down
Loading
Loading