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

Add option to have persistent filter option #6256

Closed
Tracked by #6259
MilosPaunovic opened this issue Dec 3, 2024 · 14 comments
Closed
Tracked by #6259

Add option to have persistent filter option #6256

MilosPaunovic opened this issue Dec 3, 2024 · 14 comments
Assignees
Labels
area/frontend Needs frontend code changes enhancement New feature or request good first issue Great issue for new contributors

Comments

@MilosPaunovic
Copy link
Member

MilosPaunovic commented Dec 3, 2024

Add the ability to send some sort of prop to filters to make them persistent (not removable) from bar.

@MilosPaunovic MilosPaunovic added enhancement New feature or request area/frontend Needs frontend code changes labels Dec 3, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Dec 3, 2024
@MilosPaunovic MilosPaunovic added the good first issue Great issue for new contributors label Dec 3, 2024
@sr467113
Copy link

sr467113 commented Dec 3, 2024

Hi,
I am looking to work on this issue.
May I please get bit more clarity on the same if you don't mind.

@MilosPaunovic
Copy link
Member Author

Hi @sr467113,

So, what we want is, for example, when the user opens a single namespace page, to have that particular namespace already selected in filters bar, but without the option to remove it. So, to pass a prop of some kind (let's call it persistent) and if present, disable the removal of filter.

image

@sr467113
Copy link

sr467113 commented Dec 4, 2024

Hi @sr467113,

So, what we want is, for example, when the user opens a single namespace page, to have that particular namespace already selected in filters bar, but without the option to remove it. So, to pass a prop of some kind (let's call it persistent) and if present, disable the removal of filter.

image

Ok. Let me look into it. Thanks 👍👍

@JaydenKrishna
Copy link

Hi,

I am a CS student from Florida International University working on open-source projects. I would be interested in testing this feature. Would it be possible for me to receive access?

@MilosPaunovic
Copy link
Member Author

Absolutely, go for it @JaydenKrishna, will wait for your PR! 🚀

@JaydenKrishna
Copy link

Absolutely, go for it @JaydenKrishna, will wait for your PR! 🚀

HI @MilosPaunovic , where can I find the source code for this specific issue? Thanks.

@MilosPaunovic
Copy link
Member Author

You can start by looking at the kestra/ui/src/components/filter/KestraFilter.vue component, but you'll have to investigate a bit more yourself and see what and where needs amending.

@MilosPaunovic MilosPaunovic moved this from Backlog to In progress in Issues Jan 24, 2025
@MilosPaunovic
Copy link
Member Author

Hi @JaydenKrishna,

As there hasn't been any progress or updates on this, I'll unassign you for now. However, if you do open a PR, it will be reviewed, and you'll be reassigned if no one else handles it in the meantime.

Thanks for all the efforts so far! 🍀

@MilosPaunovic MilosPaunovic moved this from In progress to Backlog in Issues Feb 1, 2025
@HarshitDhaduk
Copy link
Contributor

Hi @MilosPaunovic,

If this issue is still open. I would like to work on this. Can you please assign this issue to me?

@MilosPaunovic
Copy link
Member Author

Absolutely, go for it @HarshitDhaduk! 🚀

@MilosPaunovic MilosPaunovic moved this from Backlog to In progress in Issues Feb 4, 2025
@MilosPaunovic
Copy link
Member Author

Hi @HarshitDhaduk ,

Are there any updates on progress of this issue?

@HarshitDhaduk
Copy link
Contributor

I have tried using el-tag component from element-plus to make a custom tag renderer to disable close functionality (clossable tag) when a single namespace page is selected.

This is the custom-tag renderer component:

        <template #tag="{current}">
            <el-tag
                :disable-transitions="true"
                :closable="!current?.persistent" 
                @close="() => removeItem(current)"
            >
                <Label :option="current" /> 
            </el-tag>
        </template>

In removeItem function, If value passed is persistent=true. The function will return null without removing any item.

I am facing some problem setting up backend to test this locally. Tried using setting up frontend without backend source code guide. But, still facing issues setting up locally. (probably because of my system specs : 4GB RAM is not enough ig)

Can I make a PR, if the solution sounds good to you?

@MilosPaunovic
Copy link
Member Author

Yes, certainly, you can open a PR and we'll go from there! 🚀

@MilosPaunovic
Copy link
Member Author

Thanks for the contributions @HarshitDhaduk! 🚀

Closed via #7276.

@github-project-automation github-project-automation bot moved this from In review to Done in Issues Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Needs frontend code changes enhancement New feature or request good first issue Great issue for new contributors
Projects
Status: Done
Development

No branches or pull requests

4 participants