FlowTests drive the narrowest phone through what landed so far, each opened menu, sheet or dialog checked to be whole on the screen with 44px targets (fit.js measures inside a scope now): the menu closes after a choice, an outside tap and Escape; "Liked by" rises from the bottom and closes from its button; a new post is written in the sheet the round button opens from a scrolled feed, with the words focused; a reply is written in a sheet; a reaction is picked from the React sheet, through the one-time public notice, and taken back. Cells client.mobile.flow.*. The menu's dark-mode toggle gets a 44px hit area and a name, and the public notice dialog marks itself for the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
@inherits LocalizableComponentBase
|
|
@implements IDisposable
|
|
|
|
@* The one-time notice before a persona's first reaction or poll vote, and before it first joins an event
|
|
(PublicNoticeService), in MainLayout. *@
|
|
<DModal Placement="DModalPlacement.ResponsiveBottom" IsOpen="Notices.IsAsking" IsOpenChanged="Closed" CloseOnBackdrop="false" CloseText="@Localizer["Close"]"
|
|
data-public-notice>
|
|
<Heading>@(Notices.Act == PublicAct.Participation ? Localizer["Joining an event is public"] : Localizer["Reactions and votes are public"])</Heading>
|
|
<ChildContent>
|
|
<p class="text-sm">
|
|
@(Notices.Act == PublicAct.Participation
|
|
? Localizer["The event's server shows who takes part, {0} included. Your other personas are never named.", CascadingState.Persona?.Name ?? ""]
|
|
: Localizer["Anyone who can see the post can see that {0} reacted to it or voted in it. Your other personas are never named.", CascadingState.Persona?.Name ?? ""])
|
|
</p>
|
|
</ChildContent>
|
|
<Actions>
|
|
<DButton Size="DSize.Sm" OnClick="() => Notices.Answer(false)">@Localizer["Cancel"]</DButton>
|
|
<DButton Size="DSize.Sm" Color="DColor.Primary" OnClick="() => Notices.Answer(true)" data-public-notice-yes>@Localizer["Continue"]</DButton>
|
|
</Actions>
|
|
</DModal>
|
|
|
|
@code {
|
|
[Inject] PublicNoticeService Notices { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
Notices.Changed += Refresh;
|
|
IsLoading = false;
|
|
}
|
|
|
|
void Refresh() => InvokeAsync(StateHasChanged);
|
|
|
|
void Closed(bool open)
|
|
{
|
|
if (!open)
|
|
Notices.Answer(false);
|
|
}
|
|
|
|
public void Dispose() => Notices.Changed -= Refresh;
|
|
}
|