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

cannot hide or move No Value for custom stage field on kanban view #8591

Closed
code1704 opened this issue Nov 19, 2024 · 6 comments · Fixed by #8613
Closed

cannot hide or move No Value for custom stage field on kanban view #8591

code1704 opened this issue Nov 19, 2024 · 6 comments · Fixed by #8613
Labels
good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: short

Comments

@code1704
Copy link

  1. add a custom stage field to some object
  2. add a kanban view

Bug: cannot hide No Value; cannot move No Value to the top

Image

@Bonapara Bonapara added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: short labels Nov 19, 2024
@khuddite
Copy link
Contributor

I will take a look

@sriharika13
Copy link

I understand the issue, Pl assign it to me, I can solve it

@khuddite
Copy link
Contributor

khuddite commented Nov 20, 2024

@Bonapara It seems hide/dnd(drag-and-drop) has been intentionally disabled for no value groups in this PR - e8d96cf

Now, do we wanna change that behavior and not differentiate them?

You can check out these 2 specific lines in the PR -

const noValueViewGroups =
    viewGroups.filter(
      (viewGroup) => viewGroup.type === RecordGroupDefinitionType.NoValue,
    ) ?? [];

  const viewGroupsWithoutNoValueGroups = viewGroups.filter(
    (viewGroup) => viewGroup.type !== RecordGroupDefinitionType.NoValue,
  );

(https://github.com/khuddite/twenty/blob/24c0b0f8733565912efda91077597773cb1909a1/packages/twenty-front/src/modules/views/components/ViewGroupsVisibilityDropdownSection.tsx#L53)

@Bonapara
Copy link
Member

Hi @khuddite I think we might change that behavior so the "no value" acts like other groups if it doesn't break anything.

@khuddite
Copy link
Contributor

@Bonapara If that's the path we wanna follow, I will make the necessary changes in a way nothing breaks.

@Bonapara
Copy link
Member

Notion allows it, so I don't see why we wouldn't!

bosiraphael pushed a commit that referenced this issue Nov 26, 2024
…8613)

Fixes #8591 

1. Summary
We disabled hide/dnd(drag-and-drop) options for `No value` view group
intentionally in the first implementation. We want to change it to
behave like normal view groups, so enable hide/dnd for `No value` view
group as well.

2. Solution
I have removed the code that filters the `No value` group out of view
groups, so `No value` is stored in the same array as other view groups.
I have removed the `No value` flag check for `Hide` button on the
hamburger menu of the Kanban header. I had to update the code in
`packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts`
because it was ignoring the visibility flag of the `No value` view group
and set it always to true. Also, it was always putting the `No value`
group last ignoring the previous position.
>**_I am not 100% confident in the changes I made in
`packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts`.
I'd like to have a review from someone more familiar with that part._**

3. Recording

https://github.com/user-attachments/assets/e135e22e-6e3a-4f94-a898-aafc03bba060
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: short
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants