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

#23 Left static sidebar #5

Merged
merged 24 commits into from
May 22, 2024
Merged

#23 Left static sidebar #5

merged 24 commits into from
May 22, 2024

Conversation

Salam-Dalloul
Copy link

@Salam-Dalloul Salam-Dalloul commented May 4, 2024

Screenshot 2024-05-10 at 2 16 05 PM Screenshot 2024-05-10 at 2 16 19 PM Screenshot 2024-05-10 at 2 16 30 PM Screenshot 2024-05-10 at 2 17 22 PM

- static left sidebar with 3 buttons

- first button to compress the sidebar and leave only the minimal part visible
@Salam-Dalloul Salam-Dalloul requested a review from ddelpiano May 10, 2024 11:17
@Salam-Dalloul Salam-Dalloul marked this pull request as ready for review May 10, 2024 11:17
@ddelpiano ddelpiano requested review from vidhya-metacell and aranega and removed request for ddelpiano May 13, 2024 14:35
Copy link
Member

@aranega aranega left a comment

Choose a reason for hiding this comment

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

It looks good to me, but it might be interesting to see if we can use some new concepts from react (<Suspens>). If we cannot, there is no problem.

The request for change comes from the fact that the PR is going to CELE-22 which is already merged, please redirect it towards develop and check/fix the merge conflicts if any ☺️


</Box>
const hasLaunched = currentWorkspaceId != undefined;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not 100% sure as I'm not very skilled for everything frontend related 😅, but instead of having the hasLaunched variable and the classical ternary operator, could it be one of those scenarios where we could use <Suspense></Suspense>?

</ThemeProvider>
</>
)
const isLoading = LayoutComponent === undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Same here, would it be interesting to see if we can use Suspens?

Copy link
Author

Choose a reason for hiding this comment

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

@aranega for this one we can use the Suspens as there is a loading state until we get the data, but for the previous one it's more a conditional rendering between 2 components that we have, I only used it here as it's more suitable

Copy link
Member

Choose a reason for hiding this comment

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

@Salam-Dalloul Ok, got it! Thanks for the clarification

Copy link
Member

Choose a reason for hiding this comment

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

@Salam-Dalloul I can see that at the end the isLoading is staying. I tried to remove it, but there is an issue, something is not loading well after. I guess that if we cannot remove it, then we can remove the use of <Suspense> all the point was to not use the isLoading variable :)

Copy link
Author

@Salam-Dalloul Salam-Dalloul May 16, 2024

Choose a reason for hiding this comment

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

fyi @aranega the crashing was because the initial state of the LayoutComponent was undefined, there is a possible solution to put the initial state as a Loading component

const [LayoutComponent, setLayoutComponent] = useState<React.ComponentType>(() => LoadingComponent);

this will fix the crashing issue and will show the loading as an initial state until we have the LayoutComponent without the need of isLoading, please let me know if there is a better way, and thanks for the suggestion :)

Copy link

@vidhya-metacell vidhya-metacell left a comment

Choose a reason for hiding this comment

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

Hey @Salam-Dalloul
I was reading the details for the issue CELE/23, according to the tasks, i find the following points missing( I am not sure if there was any discussion to not do the below points)

  1. Search and Add from neurons, the dropdown is not like figma yet its empty( also change the placeholder value for the input)
  2. bin icon to remove neuron
    • to create groups that makes a modal with input text for the group name appearing
    • per neuron to add neuron to a group through the menu linked to it
  3. Datasets -dropdown with the list of all categories (filter as well).

For the UI

  1. Height should be 56 as in figma
    image1

  2. WIdth is 56 in figma
    image2

  3. Border radius is 6 in figma
    image3

  4. Width is 300px in figma
    image4

  5. Yellow margin should be 12. not 24
    image5

  6. Scrollbar is not functional
    image6

  7. Text truncation is not working
    image7

  8. Space between the development stage 1 heading the the items below is incorrect
    image8

9)Height in figma is 52
image9

  1. Margin top is wrong
    image10

  2. Hover state for dataset option is missing

image11
  1. In figma its more of a rectangle than a circle
image12
  1. Tooltip for the switches is missing
image13

@Salam-Dalloul Salam-Dalloul changed the base branch from feature/CELE-22 to develop May 15, 2024 14:45
Copy link
Member

@aranega aranega left a comment

Choose a reason for hiding this comment

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

@Salam-Dalloul The modifications you made for my side are nice :), thanks. Just perhaps remove the <Suspense> as the isLoading variable is still needed.

The build step is failing currently due to multiple small issues:

  • unused imports => better to remove them
  • unused variable => some are for constants, if they are not used right now, perhaps it's better to comment them. If a variable is needed as parameter of a function, but is not used later, just name it _
  • an overload issue => need to check what's going on, could be a mismatching signature (The error might be related to this error that pops in the console React does not recognize the 'textWrap' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'textwrap' instead. If you accidentally passed it from a parent component, remove it from the DOM element.)
  • a typing issue (property not existing on an unknown type) => need to check i this is a typo, really a typing issue or just a function/parameter somewhere misses a signature

You can find the details about the errors here:
https://github.com/MetaCell/c-elegans-app/actions/runs/9101844468/job/25020025355?pr=5

</ThemeProvider>
</>
)
const isLoading = LayoutComponent === undefined;
Copy link
Member

Choose a reason for hiding this comment

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

@Salam-Dalloul Ok, got it! Thanks for the clarification

</ThemeProvider>
</>
)
const isLoading = LayoutComponent === undefined;
Copy link
Member

Choose a reason for hiding this comment

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

@Salam-Dalloul I can see that at the end the isLoading is staying. I tried to remove it, but there is an issue, something is not loading well after. I guess that if we cannot remove it, then we can remove the use of <Suspense> all the point was to not use the isLoading variable :)

@Salam-Dalloul
Copy link
Author

Salam-Dalloul commented May 16, 2024

Hey @Salam-Dalloul I was reading the details for the issue CELE/23, according to the tasks, i find the following points missing( I am not sure if there was any discussion to not do the below points)

  1. Search and Add from neurons, the dropdown is not like figma yet its empty( also change the placeholder value for the input)
  2. bin icon to remove neuron
    • to create groups that makes a modal with input text for the group name appearing
    • per neuron to add neuron to a group through the menu linked to it
  3. Datasets -dropdown with the list of all categories (filter as well).

For the UI

  1. Height should be 56 as in figma
    image1
  2. WIdth is 56 in figma
    image2
  3. Border radius is 6 in figma
    image3
  4. Width is 300px in figma
    image4
  5. Yellow margin should be 12. not 24
    image5
  6. Scrollbar is not functional
    image6
  7. Text truncation is not working
    image7
  8. Space between the development stage 1 heading the the items below is incorrect
    image8

9)Height in figma is 52 image9

  1. Margin top is wrong
    image10
  2. Hover state for dataset option is missing
image11 12. In figma its more of a rectangle than a circle image12 13. Tooltip for the switches is missing image13

@vidhya-metacell about

  1. Search and Add from neurons, the dropdown is not like figma yet its empty( also change the placeholder value for the input)
  1. Datasets -dropdown with the list of all categories (filter as well).

both have a separated tasks

3- Border radius is 6 in figma: it's .5rem in figma which is already implemented
Screenshot 2024-05-16 at 10 12 27 PM

5- Yellow margin should be 12. not 24: it's 1.5rem in figma and what is implemented
Screenshot 2024-05-16 at 10 20 17 PM

6- Scrollbar is not functional and 7- Text truncation is not working: tried it and was working fine, could you please re test this again?

Screen.Recording.2024-05-16.at.10.22.31.PM.mov

Copy link

@vidhya-metacell vidhya-metacell left a comment

Choose a reason for hiding this comment

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

Hey @Salam-Dalloul
I was reading the details for the issue CELE/23, according to the tasks, i find the following points missing( I am not sure if there was any discussion to not do the below points)

  1. Search and Add from neurons, the dropdown is not like figma yet its empty( also change the placeholder value for the input)
  2. bin icon to remove neuron
    • to create groups that makes a modal with input text for the group name appearing
    • per neuron to add neuron to a group through the menu linked to it
  3. Datasets -dropdown with the list of all categories (filter as well).

For the UI

  1. Height should be 56 as in figma
    image1

  2. WIdth is 56 in figma
    image2

  3. Border radius is 6 in figma
    image3

  4. Width is 300px in figma
    image4

  5. Yellow margin should be 12. not 24
    image5

  6. Scrollbar is not functional
    image6

  7. Text truncation is not working
    image7

  8. Space between the development stage 1 heading the the items below is incorrect
    image8

9)Height in figma is 52
image9

  1. Margin top is wrong
    image10

  2. Hover state for dataset option is missing

image11
  1. In figma its more of a rectangle than a circle
image12
  1. Tooltip for the switches is missing
image13

Hey @Salam-Dalloul , things are looking pretty good now, only a few tiny misses this time

  1. Please check the border radius in the active state.
    image3

  2. In figma the total space between the dataset description and search is 1.5, but in your case if you notice there is margin 1.5 but also a padding coming in the bottom
    of the description box which inturn increases the whole space

image5

iamge5 figma

  1. There needs to be a gap of 0.5 between the Development stage 1 and ul, the gap exists between the list items which is good, but there is none between the heading and the list
    image8
    the below is from the code, where youc an see no gap
    image 8 code

  2. Tooltip on the switch is behaving weird with only showing on the second switch

Screen.Recording.2024-05-17.at.5.44.06.PM.mov

@Salam-Dalloul
Copy link
Author

Hey @Salam-Dalloul I was reading the details for the issue CELE/23, according to the tasks, i find the following points missing( I am not sure if there was any discussion to not do the below points)

  1. Search and Add from neurons, the dropdown is not like figma yet its empty( also change the placeholder value for the input)
  2. bin icon to remove neuron
    • to create groups that makes a modal with input text for the group name appearing
    • per neuron to add neuron to a group through the menu linked to it
  3. Datasets -dropdown with the list of all categories (filter as well).

For the UI

  1. Height should be 56 as in figma
    image1
  2. WIdth is 56 in figma
    image2
  3. Border radius is 6 in figma
    image3
  4. Width is 300px in figma
    image4
  5. Yellow margin should be 12. not 24
    image5
  6. Scrollbar is not functional
    image6
  7. Text truncation is not working
    image7
  8. Space between the development stage 1 heading the the items below is incorrect
    image8

9)Height in figma is 52 image9

  1. Margin top is wrong
    image10
  2. Hover state for dataset option is missing
image11 12. In figma its more of a rectangle than a circle image12 13. Tooltip for the switches is missing image13 Hey @Salam-Dalloul , things are looking pretty good now, only a few tiny misses this time
  1. Please check the border radius in the active state.
    image3
  2. In figma the total space between the dataset description and search is 1.5, but in your case if you notice there is margin 1.5 but also a padding coming in the bottom
    of the description box which inturn increases the whole space

image5

iamge5 figma

  1. There needs to be a gap of 0.5 between the Development stage 1 and ul, the gap exists between the list items which is good, but there is none between the heading and the list
    image8
    the below is from the code, where youc an see no gap
    image 8 code
  2. Tooltip on the switch is behaving weird with only showing on the second switch

Screen.Recording.2024-05-17.at.5.44.06.PM.mov

@vidhya-metacell fixed all of them and about the border radius @syamace-metacell have updated the design to be united in both cases, to be .5rem

Copy link

@vidhya-metacell vidhya-metacell left a comment

Choose a reason for hiding this comment

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

@Salam-Dalloul looks good now

@ddelpiano ddelpiano merged commit e8477d2 into develop May 22, 2024
4 checks passed
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.

4 participants