Skip to content
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

(even more) Dashboard fixes #7877

Merged
merged 20 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2b779ca
Fix table footer in firefox
somebody1234 Sep 22, 2023
db72fa5
Properly fix issue
somebody1234 Sep 22, 2023
ed57194
Fix missing error when passing invalid `startup.project`
somebody1234 Sep 25, 2023
110dc3d
Intercept "Enter" keypress when renaming projects; gracefully fail wh…
somebody1234 Sep 25, 2023
fba8b13
Intercept "Enter" keypress on other asset types just in case
somebody1234 Sep 25, 2023
cecaac5
Avoid opening editor when `startup.project` is provided
somebody1234 Sep 25, 2023
82347da
Restore ability to upload from right clicking non-directory assets
somebody1234 Sep 26, 2023
2b1c5a9
Fix search bar width
somebody1234 Sep 26, 2023
46a6761
Fix z-index on dashboard icons; blur top right menu bars; restore mis…
somebody1234 Sep 26, 2023
7d972cb
Fix `ide watch`
somebody1234 Sep 26, 2023
5bd9ef0
Fix backend not restoring back to local
somebody1234 Sep 26, 2023
66bc2c3
Fix restoring local projects from `localStorage`
somebody1234 Sep 26, 2023
4f93333
Add background for page switcher icons
somebody1234 Sep 27, 2023
2e73c2a
Use a different method to restore local project
somebody1234 Sep 27, 2023
bb3164e
Merge branch 'develop' into wip/sb/fix-table-footer
somebody1234 Sep 27, 2023
73697dc
Fix modal z-index
somebody1234 Sep 28, 2023
52a62da
Remove responsive text size
somebody1234 Sep 28, 2023
16dd216
Fix restoring local project when on cloud backend
somebody1234 Sep 29, 2023
f34861d
Fix restoring local project on `ide build`
somebody1234 Sep 29, 2023
9b9b4cd
Trigger CI
somebody1234 Sep 29, 2023
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
1 change: 0 additions & 1 deletion app/ide-desktop/lib/client/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const ALL_BUNDLES_READY = new Promise<Watches>((resolve, reject) => {
},
})
dashboardOpts.outdir = path.resolve(IDE_DIR_PATH, 'assets')
dashboardOpts.write = false
const dashboardBuilder = await esbuild.context(dashboardOpts)
const dashboard = await dashboardBuilder.rebuild()
console.log('Result of dashboard bundling: ', dashboard)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ export default function ForgotPassword() {

return (
<div className="min-h-screen flex flex-col items-center justify-center">
<div
className={
'flex flex-col bg-white shadow-md px-4 sm:px-6 md:px-8 lg:px-10 py-8 rounded-md w-full ' +
'max-w-md'
}
>
<div className="font-medium self-center text-xl sm:text-2xl uppercase text-gray-800">
<div className="flex flex-col bg-white shadow-md p-8 rounded-md w-full max-w-md">
<div className="font-medium self-center text-xl uppercase text-gray-800">
Forgot Your Password?
</div>
<div className="mt-10">
Expand All @@ -45,7 +40,7 @@ export default function ForgotPassword() {
<div className="flex flex-col mb-6">
<label
htmlFor="email"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
E-Mail Address:
</label>
Expand All @@ -69,7 +64,7 @@ export default function ForgotPassword() {
type="submit"
className={
'flex items-center justify-center focus:outline-none text-white text-sm ' +
'sm:text-base bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'duration-150 ease-in'
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function Input(props: InputProps) {
}
: onBlur
}
className="text-sm sm:text-base placeholder-gray-500 pl-10 pr-4 rounded-lg border border-gray-400 w-full py-2 focus:outline-none focus:border-blue-400"
className="text-sm placeholder-gray-500 pl-10 pr-4 rounded-lg border border-gray-400 w-full py-2 focus:outline-none focus:border-blue-400"
/>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ export default function Login() {

return (
<div className="min-h-screen flex flex-col items-center justify-center">
<div
className={
'flex flex-col bg-white shadow-md px-4 sm:px-6 md:px-8 lg:px-10 py-8 rounded-md ' +
'w-full max-w-md'
}
>
<div className="font-medium self-center text-xl sm:text-2xl uppercase text-gray-800">
<div className="flex flex-col bg-white shadow-md p-8 rounded-md w-full max-w-md">
<div className="font-medium self-center text-xl uppercase text-gray-800">
Login To Your Account
</div>
<button
Expand Down Expand Up @@ -99,7 +94,7 @@ export default function Login() {
<div className="flex flex-col mb-6">
<label
htmlFor="email"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
E-Mail Address:
</label>
Expand All @@ -124,7 +119,7 @@ export default function Login() {
<div className="flex flex-col mb-6">
<label
htmlFor="password"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
Password:
</label>
Expand Down Expand Up @@ -152,7 +147,7 @@ export default function Login() {
<div className="flex ml-auto">
<router.Link
to={app.FORGOT_PASSWORD_PATH}
className="inline-flex text-xs sm:text-sm text-blue-500 hover:text-blue-700"
className="inline-flex text-xs text-blue-500 hover:text-blue-700"
>
Forgot Your Password?
</router.Link>
Expand All @@ -164,7 +159,7 @@ export default function Login() {
type="submit"
className={
'flex items-center justify-center focus:outline-none text-white ' +
'text-sm sm:text-base bg-blue-600 hover:bg-blue-700 rounded py-2 w-full ' +
'text-sm bg-blue-600 hover:bg-blue-700 rounded py-2 w-full ' +
'transition duration-150 ease-in disabled:opacity-50'
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ export default function Registration() {
const { organizationId } = parseUrlSearchParams(location.search)

return (
<div className="flex flex-col items-center justify-center min-h-screen px-4 py-8">
<div className="flex flex-col items-center justify-center min-h-screen p-8">
<div
className={
'rounded-md bg-white w-full max-w-sm sm:max-w-md border border-gray-200 ' +
'shadow-md px-4 py-6 sm:p-8'
}
>
<div className="font-medium self-center text-xl sm:text-2xl uppercase text-gray-800">
<div className="font-medium self-center text-xl uppercase text-gray-800">
Create new account
</div>

Expand All @@ -59,10 +59,7 @@ export default function Registration() {
}}
>
<div className="flex flex-col mb-4">
<label
htmlFor="email"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
>
<label htmlFor="email" className="mb-1 text-xs tracking-wide text-gray-600">
E-Mail Address:
</label>
<div className="relative">
Expand All @@ -85,7 +82,7 @@ export default function Registration() {
<div className="flex flex-col mb-4">
<label
htmlFor="password"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
Password:
</label>
Expand All @@ -111,7 +108,7 @@ export default function Registration() {
<div className="flex flex-col mb-4">
<label
htmlFor="password_confirmation"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
Confirm Password:
</label>
Expand Down Expand Up @@ -140,7 +137,7 @@ export default function Registration() {
type="submit"
className={
'flex items-center justify-center focus:outline-none text-white text-sm ' +
'sm:text-base bg-indigo-600 hover:bg-indigo-700 rounded py-2 w-full transition ' +
'bg-indigo-600 hover:bg-indigo-700 rounded py-2 w-full transition ' +
'duration-150 ease-in disabled:opacity-50'
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,8 @@ export default function ResetPassword() {

return (
<div className="min-h-screen flex flex-col items-center justify-center">
<div
className={
'flex flex-col bg-white shadow-md px-4 sm:px-6 md:px-8 lg:px-10 py-8 rounded-md w-full ' +
'max-w-md'
}
>
<div className="font-medium self-center text-xl sm:text-2xl uppercase text-gray-800">
<div className={'flex flex-col bg-white shadow-md p-8 rounded-md w-full ' + 'max-w-md'}>
<div className="font-medium self-center text-xl uppercase text-gray-800">
Reset Your Password
</div>
<div className="mt-10">
Expand All @@ -73,7 +68,7 @@ export default function ResetPassword() {
<div className="flex flex-col mb-6">
<label
htmlFor="email"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
E-Mail Address:
</label>
Expand All @@ -96,7 +91,7 @@ export default function ResetPassword() {
<div className="flex flex-col mb-6">
<label
htmlFor="code"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
Confirmation Code:
</label>
Expand All @@ -119,7 +114,7 @@ export default function ResetPassword() {
<div className="flex flex-col mb-6">
<label
htmlFor="new_password"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
New Password:
</label>
Expand All @@ -145,7 +140,7 @@ export default function ResetPassword() {
<div className="flex flex-col mb-6">
<label
htmlFor="new_password_confirm"
className="mb-1 text-xs sm:text-sm tracking-wide text-gray-600"
className="mb-1 text-xs tracking-wide text-gray-600"
>
Confirm New Password:
</label>
Expand Down Expand Up @@ -173,7 +168,7 @@ export default function ResetPassword() {
type="submit"
className={
'flex items-center justify-center focus:outline-none text-white text-sm ' +
'sm:text-base bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'duration-150 ease-in'
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function SetUsername() {
'max-w-md'
}
>
<div className="font-medium self-center text-xl sm:text-2xl uppercase text-gray-800">
<div className="font-medium self-center text-xl uppercase text-gray-800">
Set your username
</div>
<div className="mt-10">
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function SetUsername() {
type="submit"
className={
'flex items-center justify-center focus:outline-none text-white text-sm ' +
'sm:text-base bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'bg-blue-600 hover:bg-blue-700 rounded py-2 w-full transition ' +
'duration-150 ease-in'
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function AuthProvider(props: AuthProviderProps) {
setInitialized(true)
setUserSession(OFFLINE_USER_SESSION)
if (supportsLocalBackend) {
setBackendWithoutSavingType(new localBackend.LocalBackend(projectManagerUrl, null))
setBackendWithoutSavingType(new localBackend.LocalBackend(projectManagerUrl))
} else {
// Provide dummy headers to avoid errors. This `Backend` will never be called as
// the entire UI will be disabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function AppRouter(props: AppProps) {
const userSession = authService.cognito.userSession.bind(authService.cognito)
const registerAuthEventListener = authService.registerAuthEventListener
const initialBackend: backend.Backend = isAuthenticationDisabled
? new localBackend.LocalBackend(projectManagerUrl, null)
? new localBackend.LocalBackend(projectManagerUrl)
: // This is safe, because the backend is always set by the authentication flow.
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
null!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ import * as backendModule from './backend'

/** A node in the drive's item tree. */
export interface AssetTreeNode {
/** The original id of the asset (the placeholder id for new assets). This must never change. */
/** The id of the asset (or the placeholder id for new assets). This must never change. */
key: backendModule.AssetId
/** The actual asset. This MAY change if this is initially a placeholder item, but rows MAY
* keep updated values within the row itself as well. */
item: backendModule.AnyAsset
/** The id of the asset's parent directory (or the placeholder id for new assets).
* This must never change. */
directoryKey: backendModule.AssetId | null
/** The actual id of the asset's parent directory (or the placeholder id for new assets). */
directoryId: backendModule.DirectoryId | null
/** This is `null` if the asset is not a directory asset, OR if it is a collapsed directory
* asset. */
children: AssetTreeNode[] | null
Expand Down Expand Up @@ -113,11 +118,15 @@ export function assetTreePreorderTraversal(
/** Creates an {@link AssetTreeNode} from a {@link backendModule.AnyAsset}. */
export function assetTreeNodeFromAsset(
asset: backendModule.AnyAsset,
directoryKey: backendModule.AssetId | null,
directoryId: backendModule.DirectoryId | null,
depth: number
): AssetTreeNode {
return {
key: asset.id,
item: asset,
directoryKey,
directoryId,
children: null,
depth,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,20 @@ export default function AssetContextMenu(props: AssetContextMenuProps) {
}}
/>
</ContextMenu>
{asset.type === backendModule.AssetType.directory ? (
<GlobalContextMenu
hidden={hidden}
// This is SAFE, as this only exists when the item is a directory.
<GlobalContextMenu
hidden={hidden}
directoryKey={
// This is SAFE, as both branches are guaranteed to be `DirectoryId`s
// eslint-disable-next-line no-restricted-syntax
directoryKey={item.key as backendModule.DirectoryId}
directoryId={asset.id}
dispatchAssetListEvent={dispatchAssetListEvent}
/>
) : null}
(asset.type === backendModule.AssetType.directory
? item.key
: item.directoryKey) as backendModule.DirectoryId
}
directoryId={
asset.type === backendModule.AssetType.directory ? asset.id : item.directoryId
}
dispatchAssetListEvent={dispatchAssetListEvent}
/>
</ContextMenus>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface AssetInfoBarProps {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default function AssetInfoBar(_props: AssetInfoBarProps) {
return (
<div className="flex items-center shrink-0 bg-frame rounded-full gap-3 h-8 px-2 cursor-default pointer-events-auto">
<div className="flex items-center shrink-0 bg-frame backdrop-blur-3xl rounded-full gap-3 h-8 px-2 cursor-default pointer-events-auto">
<Button
active={false}
disabled
Expand Down
Loading
Loading