FN-5781: move settings Help link to footer version row
Relocate the Settings Help/discussions action from the header controls to the footer version area for clearer placement. - Remove the Help button from the settings header action group and keep Star/Discord there. - Add the Help link beside the footer version/update-check section with the same hardened external-link attributes. - Update Settings modal styling for the new footer help placement and spacing behavior. - Adjust Settings modal and mobile CSS tests to assert the new Help location and height contract selectors. Files changed: .../dashboard/app/components/SettingsModal.css | 12 ++++++++---- .../dashboard/app/components/SettingsModal.tsx | 22 +++++++++++----------- .../components/__tests__/SettingsModal.test.tsx | 12 +++++++++++- .../components/__tests__/settings-mobile.test.tsx | 4 ++-- 4 files changed, 32 insertions(+), 18 deletions(-) Fusion-Task-Id: FN-5781 Fusion-Task-Lineage: 90fe2f30-c2fe-438b-b486-3b6ef14e21a6
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Extracted from styles.css as part of the Sweep-3 CSS extraction effort.
|
||||
Imported by SettingsModal.tsx (and MemoryView.tsx for shared classes). */
|
||||
|
||||
/* === Settings Modal header action buttons (Star on GitHub, Help) === */
|
||||
/* === Settings Modal header action buttons (Star on GitHub, Discord) === */
|
||||
.settings-header-actions {
|
||||
--settings-header-action-height: calc(var(--space-md) * 2 + var(--space-xs) / 2);
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
/* Keep the GitHub Star and Help buttons at matching heights regardless of
|
||||
their differing icon sizes (provider icon 16px vs. HelpCircle 13px). */
|
||||
.settings-header-actions > .settings-github-star-btn,
|
||||
.settings-header-actions > .settings-header-discord-btn,
|
||||
.settings-header-actions > .settings-header-help-btn {
|
||||
.settings-header-actions > .settings-header-discord-btn {
|
||||
height: var(--settings-header-action-height);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.settings-header-discord-btn,
|
||||
.settings-header-help-btn {
|
||||
.settings-footer-help-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -162,6 +161,7 @@
|
||||
.settings-modal-footer-version {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-xs);
|
||||
margin-right: var(--space-sm);
|
||||
min-width: 0;
|
||||
}
|
||||
@@ -183,6 +183,10 @@
|
||||
flex-wrap: wrap;
|
||||
row-gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.settings-footer-help-btn {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-version-check-btn {
|
||||
|
||||
@@ -7462,17 +7462,6 @@ export function SettingsModal({
|
||||
<MessageCircle size={13} aria-hidden="true" />
|
||||
Discord
|
||||
</a>
|
||||
<a
|
||||
href="https://github.com/Runfusion/Fusion/discussions"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="btn btn-sm settings-header-help-btn"
|
||||
aria-label="Help and discussions"
|
||||
title="Help and discussions"
|
||||
>
|
||||
<HelpCircle size={13} aria-hidden="true" />
|
||||
Help
|
||||
</a>
|
||||
</div>
|
||||
<button className="modal-close" onClick={onClose} aria-label="Close">
|
||||
×
|
||||
@@ -7539,6 +7528,17 @@ export function SettingsModal({
|
||||
)}
|
||||
<div className="modal-actions">
|
||||
<div className="settings-modal-footer-version">
|
||||
<a
|
||||
href="https://github.com/Runfusion/Fusion/discussions"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="btn btn-sm settings-footer-help-btn"
|
||||
aria-label="Help and discussions"
|
||||
title="Help and discussions"
|
||||
>
|
||||
<HelpCircle size={13} aria-hidden="true" />
|
||||
Help
|
||||
</a>
|
||||
<div className="settings-update-check">
|
||||
{appVersion && (
|
||||
<button
|
||||
|
||||
@@ -1538,7 +1538,17 @@ describe("SettingsModal", () => {
|
||||
|
||||
expect(within(headerActions as HTMLElement).getByRole("link", { name: "Star Fusion on GitHub" })).toBeInTheDocument();
|
||||
expect(within(headerActions as HTMLElement).getByRole("link", { name: "Join our Discord" })).toBeInTheDocument();
|
||||
expect(within(headerActions as HTMLElement).getByRole("link", { name: "Help and discussions" })).toBeInTheDocument();
|
||||
expect(within(headerActions as HTMLElement).queryByRole("link", { name: "Help and discussions" })).not.toBeInTheDocument();
|
||||
|
||||
const footerVersion = document.querySelector(".settings-modal-footer-version");
|
||||
expect(footerVersion).toBeInTheDocument();
|
||||
|
||||
const helpLink = within(footerVersion as HTMLElement).getByRole("link", { name: "Help and discussions" });
|
||||
expect(helpLink).toBeInTheDocument();
|
||||
expect(helpLink).toHaveAttribute("href", "https://github.com/Runfusion/Fusion/discussions");
|
||||
expect(helpLink).toHaveAttribute("target", "_blank");
|
||||
expect(helpLink).toHaveAttribute("rel", expect.stringContaining("noopener"));
|
||||
expect(helpLink).toHaveAttribute("rel", expect.stringContaining("noreferrer"));
|
||||
});
|
||||
|
||||
it("renders Discord link with hardened external attributes", async () => {
|
||||
|
||||
@@ -359,9 +359,9 @@ describe("SettingsModal mobile adaptations", () => {
|
||||
expectBaseRule(css, ".remote-status-bar", "margin: 0 var(--space-xl) var(--space-md);");
|
||||
expectBaseRule(css, ".remote-share-block", "margin: 0 var(--space-xl) var(--space-md);");
|
||||
|
||||
// Settings header actions keep Help/Star controls on a shared height contract on desktop; mobile inherits this height (FN-4354 reverted prior mobile inflation).
|
||||
// Settings header actions keep compact controls on a shared height contract on desktop; mobile inherits this height (FN-4354 reverted prior mobile inflation).
|
||||
expectBaseRule(css, ".settings-header-actions", "--settings-header-action-height: calc(var(--space-md) * 2 + var(--space-xs) / 2);");
|
||||
expectBaseRule(css, ".settings-header-actions > .settings-header-help-btn", "height: var(--settings-header-action-height);");
|
||||
expectBaseRule(css, ".settings-header-actions > .settings-header-discord-btn", "height: var(--settings-header-action-height);");
|
||||
});
|
||||
|
||||
it("FN-4354: settings header actions and modal-close have no mobile touch-target inflation", () => {
|
||||
|
||||
Reference in New Issue
Block a user