feat(ui): Page.SettingsActions for settings save bar (#819)
* feat(ui): add Page.SettingsActions for settings save bar Introduce a sticky bottom save/discard bar on Page and migrate settings pages to use it instead of header or inline save buttons. Includes profile, org, customize-lms, notifications, auth, AI tutor, course settings, certificates, and cohort settings. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(ui): always show Page.SettingsActions, disable when clean Keep the settings save bar visible at all times and disable Save and Discard when hasChanges is false instead of hiding the bar entirely. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(ui): add bottom spacing and shadow to Page.SettingsActions Wrap the actions card in a sticky container with bottom padding so it does not sit flush against the viewport edge, and use shadow-md on the card for clearer elevation. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(ui): stop viewport-sticking Page.SettingsActions on scroll Remove sticky bottom positioning so the save bar stays at the end of the page content and scrolls away when viewing upper sections. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(ui): use sticky bottom for Page.SettingsActions dock behavior Replace the IntersectionObserver fixed/dock toggle that caused layout thrashing and flipping with native position: sticky; bottom: 0. Move overflow-x-hidden from Page.Root to Page.Body so sticky is not broken. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(ui): keep Page.SettingsActions sticky and above editor content Page.Root carried md:overflow-x-auto, which makes overflow-y compute to auto, turning the root into the sticky bar's nearest scrolling ancestor. Since the root sizes to its content it never scrolls internally, so the bar rendered at its natural flow position instead of pinning to the viewport. Drop the overflow so sticky resolves against the viewport; horizontal containment stays on Page.Body. Raise the bar to z-50 so it is not painted over by the editor root, which is relative z-50. Matching rather than exceeding 50 keeps body-portaled dialogs and sheets above the bar. Show the shadow only while the bar is pinned away from its flow position, tracked with an IntersectionObserver on a 1px sentinel sibling. Unlike the previous observer this toggles a box-shadow only, so it cannot feed back into layout. * fix(ui): tighten settings actions spacing and tab visibility - Remove mt-6 and lower z-index so popovers sit above the bar - Wrap sentinel in a single root to avoid extra Page.Root flex gap - Remove Page.Body mb-4 redundant with settings actions spacing - Show certificate save bar only on the settings tab - Raise theme color picker z-index via --picker-z-index Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(dashboard): address PR review feedback for settings actions - Capture profile/org saved baselines only on initial load, not on edits - Reset course settings errors with explicit field shape in handleDiscard - Restore VisitOrgSiteButton on org profile settings header - Derive AI tutor dirty state from stores directly instead of mirrored state - Use discard-specific French label and document SettingsActions props Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * docs(ui): clarify Page.Root ownership for Page.SettingsActions "Last child of Page.Root" is a runtime relationship. Several settings pages get their Page.Root from a +layout.svelte, so the page file holds only Page.Header, Page.Body, and Page.SettingsActions. Document that this is correct and list the pages, since adding a nested Page.Root stacks two min-height containers and shortens the sticky bar's containing block. Also document that Page.SettingsActions must never be rendered from inside Page.Body: overflow-x-hidden makes Page.Body a scroll container that never scrolls, so a sticky bar in it has no travel. ---------
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Opdater",
|
||||
"unsaved_changes": {
|
||||
"message": "Du har ikke-gemte ændringer. Er du sikker på, at du vil tage afsted?"
|
||||
}
|
||||
"message": "Du har ikke-gemte ændringer. Er du sikker på, at du vil tage afsted?",
|
||||
"label": "Ikke-gemte ændringer"
|
||||
},
|
||||
"discard": "Kassér",
|
||||
"save_changes": "Gem ændringer"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Aktualisieren",
|
||||
"unsaved_changes": {
|
||||
"message": "Sie haben nicht gespeicherte Änderungen. Sind Sie sicher, dass Sie gehen möchten?"
|
||||
}
|
||||
"message": "Sie haben nicht gespeicherte Änderungen. Sind Sie sicher, dass Sie gehen möchten?",
|
||||
"label": "Nicht gespeicherte Änderungen"
|
||||
},
|
||||
"discard": "Verwerfen",
|
||||
"save_changes": "Änderungen speichern"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -289,8 +289,11 @@
|
||||
},
|
||||
"common": {
|
||||
"unsaved_changes": {
|
||||
"message": "You have unsaved changes. Are you sure you want to leave?"
|
||||
"message": "You have unsaved changes. Are you sure you want to leave?",
|
||||
"label": "Unsaved changes"
|
||||
},
|
||||
"discard": "Discard",
|
||||
"save_changes": "Save changes",
|
||||
"refresh": "Refresh"
|
||||
},
|
||||
"compliance": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Actualizar",
|
||||
"unsaved_changes": {
|
||||
"message": "Tienes cambios sin guardar. ¿Estás seguro de que quieres irte?"
|
||||
}
|
||||
"message": "Tienes cambios sin guardar. ¿Estás seguro de que quieres irte?",
|
||||
"label": "Cambios sin guardar"
|
||||
},
|
||||
"discard": "Descartar",
|
||||
"save_changes": "Guardar cambios"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Actualiser",
|
||||
"unsaved_changes": {
|
||||
"message": "Vous avez des modifications non enregistrées. Êtes-vous sûr de vouloir partir ?"
|
||||
}
|
||||
"message": "Vous avez des modifications non enregistrées. Êtes-vous sûr de vouloir partir ?",
|
||||
"label": "Modifications non enregistrées"
|
||||
},
|
||||
"discard": "Abandonner les modifications",
|
||||
"save_changes": "Enregistrer les modifications"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "रीफ़्रेश करें",
|
||||
"unsaved_changes": {
|
||||
"message": "आपके पास सहेजे नहीं गए परिवर्तन हैं. क्या आपकी वाकई छोड़ने की इच्छा है?"
|
||||
}
|
||||
"message": "आपके पास सहेजे नहीं गए परिवर्तन हैं. क्या आपकी वाकई छोड़ने की इच्छा है?",
|
||||
"label": "सहेजे नहीं गए परिवर्तन"
|
||||
},
|
||||
"discard": "त्यागें",
|
||||
"save_changes": "परिवर्तन सहेजें"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Odśwież",
|
||||
"unsaved_changes": {
|
||||
"message": "Masz niezapisane zmiany. Czy na pewno chcesz wyjść?"
|
||||
}
|
||||
"message": "Masz niezapisane zmiany. Czy na pewno chcesz wyjść?",
|
||||
"label": "Niezapisane zmiany"
|
||||
},
|
||||
"discard": "Odrzuć",
|
||||
"save_changes": "Zapisz zmiany"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Atualizar",
|
||||
"unsaved_changes": {
|
||||
"message": "Você tem alterações não salvas. Tem certeza de que deseja sair?"
|
||||
}
|
||||
"message": "Você tem alterações não salvas. Tem certeza de que deseja sair?",
|
||||
"label": "Alterações não salvas"
|
||||
},
|
||||
"discard": "Descartar",
|
||||
"save_changes": "Salvar alterações"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Обновить",
|
||||
"unsaved_changes": {
|
||||
"message": "У вас есть несохраненные изменения. Вы уверены, что хотите уйти?"
|
||||
}
|
||||
"message": "У вас есть несохраненные изменения. Вы уверены, что хотите уйти?",
|
||||
"label": "Несохраненные изменения"
|
||||
},
|
||||
"discard": "Отменить",
|
||||
"save_changes": "Сохранить изменения"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"common": {
|
||||
"refresh": "Làm mới",
|
||||
"unsaved_changes": {
|
||||
"message": "Bạn có những thay đổi chưa được lưu. Bạn có chắc chắn muốn rời đi không?"
|
||||
}
|
||||
"message": "Bạn có những thay đổi chưa được lưu. Bạn có chắc chắn muốn rời đi không?",
|
||||
"label": "Thay đổi chưa lưu"
|
||||
},
|
||||
"discard": "Hủy",
|
||||
"save_changes": "Lưu thay đổi"
|
||||
},
|
||||
"validations": {
|
||||
"generic": {
|
||||
|
||||
Reference in New Issue
Block a user