-
Notifications
You must be signed in to change notification settings - Fork 205
Feat: Add mobile breakpoint blocker screen #2726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HarshMN2345
wants to merge
3
commits into
feat-profiles
Choose a base branch
from
feat-IMA-548-block-for-mobile-view
base: feat-profiles
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <script lang="ts"> | ||
| import { Card, Layout, Typography, Icon, Alert } from '@appwrite.io/pink-svelte'; | ||
| import { IconDeviceMobile, IconDesktopComputer } from '@appwrite.io/pink-icons-svelte'; | ||
| </script> | ||
|
|
||
| <div class="mobile-studio-scrim"> | ||
| <div style:width="100%" style:max-width="480px"> | ||
| <Card.Base variant="secondary" padding="l" radius="l"> | ||
| <Layout.Stack gap="l" alignItems="center" justifyContent="center"> | ||
| <Icon icon={IconDesktopComputer} size="l" color="--fgcolor-neutral-primary" /> | ||
| <Layout.Stack gap="m" alignItems="center"> | ||
| <Typography.Title size="l" align="center"> | ||
| This experience works best on a larger screen. | ||
| </Typography.Title> | ||
| <Typography.Text align="center" color="--fgcolor-neutral-secondary"> | ||
| We’re working on making Imagine Studio fully responsive for mobile. For now, | ||
| please use a tablet or desktop. | ||
| </Typography.Text> | ||
| </Layout.Stack> | ||
| <div class="studio-alert-wrapper"> | ||
| <Alert.Inline status="info" title="Quick tip"> | ||
| <svelte:fragment slot="icon"> | ||
| <Icon icon={IconDeviceMobile} size="m" /> | ||
| </svelte:fragment> | ||
| You can enable desktop mode in your mobile browser. | ||
| </Alert.Inline> | ||
| </div> | ||
| </Layout.Stack> | ||
| </Card.Base> | ||
| </div> | ||
| </div> | ||
|
|
||
| <style> | ||
| .mobile-studio-scrim { | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| background-color: hsl(240 5% 8% / 0.6); | ||
| backdrop-filter: blur(4px); | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| z-index: 9999; | ||
| padding: var(--space-6, 12px); | ||
| } | ||
|
|
||
| .studio-alert-wrapper { | ||
| margin-block-start: var(--space-2, 4px); | ||
| width: 100%; | ||
| } | ||
|
|
||
| /* Prevent background scroll when mobile message is shown */ | ||
| :global(html:has(.mobile-studio-scrim)) { | ||
| height: 100%; | ||
| overflow: hidden !important; | ||
| } | ||
| </style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there no other way 🫠?
maybe we can add a check on
mainselector at root level layout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have also been using this class in verification block 👍 and since this is temporary do we really need it to be added in main root layout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it need to be static though? if its not static we can just scroll 👍🏻