Skip to content

feat(fe): New top section in Personal Projects limits dialog - #4812

Draft
michalspeckle wants to merge 2 commits into
mainfrom
michal/animated-top-section-in-personal-projects-limits-dialog
Draft

feat(fe): New top section in Personal Projects limits dialog#4812
michalspeckle wants to merge 2 commits into
mainfrom
michal/animated-top-section-in-personal-projects-limits-dialog

Conversation

@michalspeckle

@michalspeckle michalspeckle commented May 26, 2025

Copy link
Copy Markdown
Contributor

@fabis94 The MovePersonalProjectDialogTopSection.vue should replace the content in the <div v-if="!condensed"></div> of the LayoutDialog for personal projects limits. The other file is just the SVG I use in the section.

Here's a preview of how it should look together with the bottom part:

Screenshot 2025-05-26 at 09 01 00

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

… into michal/animated-top-section-in-personal-projects-limits-dialog

@andrewwallacespeckle andrewwallacespeckle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! My comments are all nitpicks, but still patterns we try to follow.

Let me know if it's easier to go over some of this on a call, I'm available all day :)

@@ -0,0 +1,63 @@
<template>
<div
class="bg-foundation dark:bg-foundation-2 w-full relative border-b border-outline-2 h-full overflow-clip flex justify-center"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a benefit in using overflow-clip instead of overflow-hidden?

I don't think clip is as well supported, so i'd use overflow-hidden if it works too.

></div>

<div
class="absolute shadow-2xl rounded-md my-8 p-2 gap-2 flex align-middle top-0 border z-55 w-80 h-full bg-foundation border-outline-2"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

align-middle uses vertical-align in css, but we normally use flex for this. I'd swap this to items-center

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it's personal preference, and we don't have a set rule for order of tailwind classes, but i try to group related classes, and put positioning ones at the start. This would be absolute z-55 w-80 h-full flex.... in this case

></div>

<div
class="absolute shadow-2xl rounded-md my-8 p-2 gap-2 flex align-middle top-0 border z-55 w-80 h-full bg-foundation border-outline-2"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is z-55 needed here? can we not use z-10 or z-20?

z-55 would only be used in rare occasions where we want the content to size over all the app. I don't think our dialogs even use such a high number.

class="bg-foundation dark:bg-foundation-2 w-full relative border-b border-outline-2 h-full overflow-clip flex justify-center"
>
<div
class="z-2 absolute -top-40 left-auto transform rotate-45 rounded-full p-40 border-[150px] border-b-white border-l-indigo-600 dark:border-l-indigo-400 border-r-rose-900 dark:border-r-rose-500 border-t-white blur-[200px]"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok because this is quite custom and design focussed, but we generally try to avoid redeclaring colours for dark mode. We also try to avoid using newly defined classes like blur-[200px] where possible, but i understand there is no class for this one, more just making you aware.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point taken on colors, but yeah I needed this here. Same for blur, anything less than 200px wasn't producing good enough result.

>
<WorkspaceAvatar name="My workspace" logo="" />
<span
class="h-[30px] flex place-items-center text-foreground-3 text-body-3xs font-medium"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

place-items-center seems strange here. Maybe just items-center?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, mixed up flexbox and grid - will fix that next week

<div
class="absolute shadow-2xl rounded-md my-8 p-2 gap-2 flex align-middle top-0 border z-55 w-80 h-full bg-foundation border-outline-2"
>
<WorkspaceAvatar name="My workspace" logo="" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing logo here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I use some sort of 'undefined'? It throws an error if I remove the logo attribute completely.

<ul
class="relative m-0 list-none h-[204px] w-[302px] my-20 p-0 border border-outline-2 flex bg-foundation-page justify-center rounded-md"
>
<li class="absolute z-65 justify-center rounded-md p-2 w-full">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another high z-index. If we start them all lower we should be able to keep them low.

</span>
</div>
<ul
class="relative m-0 list-none h-[204px] w-[302px] my-20 p-0 border border-outline-2 flex bg-foundation-page justify-center rounded-md"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels wrong declaring height and width to the pixel like this, but again, if it's needed for the design to work consistently, i'm happy with it.

<li class="absolute z-65 justify-center rounded-md p-2 w-full">
<div class="flex justify-between w-full gap-2 h-20">
<div
class="absolute h-20 w-[90px] card-slide-in border border-outline-2 bg-foundation rounded-md p-4 place-items-center flex-1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

place-items-center and flex-1 seems wrong again, especially when you have defined a set height and width.

Let me know if you want to jump on a call and go over some of the flex alignment classes and how we use them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andrewwallacespeckle - I was in a rush and <add more excuses>.
Also, my work from this PR is already in Fabians' approved PR, so added a paper cut ticket to improve things next week: https://linear.app/speckle/issue/WEB-3516/refactor-styles-in-intro-dialog-personal-project-limits

I will keep this PR alive for a bit longer.

@michalspeckle
michalspeckle marked this pull request as draft May 28, 2025 11:13
@fabis94
fabis94 removed their request for review June 9, 2025 09:46
@codecov

codecov Bot commented Aug 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.35%. Comparing base (b74c2fe) to head (c178846).
⚠️ Report is 1015 commits behind head on main.

❌ Your project check has failed because the head coverage (70.35%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4812      +/-   ##
==========================================
+ Coverage   70.33%   70.35%   +0.01%     
==========================================
  Files         579      579              
  Lines       25032    25032              
  Branches     3733     3733              
==========================================
+ Hits        17607    17611       +4     
+ Misses       6257     6253       -4     
  Partials     1168     1168              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants