-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement custom swipe actions #37
base: main
Are you sure you want to change the base?
Conversation
Thank you very much for your contribution. The main thing to discuss here is whether to:
What's your opinion? P.S. I'm trying to adhere to conventional commits. I would appreciate if you could try to follow it principles. Have a look at it or try to mimic my commit messages looking at the history. 😊 |
The code is working now. |
I don't have time to write tests for this feature or fix any bugs. |
Thank you very much! I'll take it from here if you don't have time. |
Thank you. I dont know how this works by the built in lovelace? I'm using UI Minimalist. |
Really looking forward to this being implemented! Googled this issue and found this PR. |
Thanks @NewsGuyTor! I think the missing piece for this PR to get merged is to add the documentation for this feature. |
We need to rebase everything but there will be a lot of conflicts. I'm thinking about rewriting this, taking huge inspiration from this PR. I'll add Albin in the commit as co-author as well as in the changelog. However, I'm a bit busy currently but It's on the roadmap with top priority. |
Hi all. So, this enhancement would be the best software enhancement known to man kind, so many use cases for the swipe back and forward view index option. I see the branch is still pending and there may be a desire to rewrite. Any way we could get this feature without the rewrite? ;-) |
No, I don't think so. Problem is that the PR works, but I need to make it stable and future-proof. For example, I could allow for arbitrary js execution, not only navigation. But in order to do this I need to sit down and think carefully because once you create the structure it's not very elegant to change it with a breaking change down the road and ask users to comply. I'm currently busy with work but I haven't forgotten this PR. =) |
Hi all. I'm okay with using the PR version until we get the refactored version. I'm okay if it breaks in the next release, I'll make the needed changes. So, I'm not a javascript developer, how can I convert the ts file to js when loading as a resource in HA? Any help really appreciated. ;) |
You can have a look at https://github.com/zanna-37/hass-swipe-navigation/blob/main/CONTRIBUTING.md#build or https://github.com/zanna-37/hass-swipe-navigation/blob/main/.github/workflows/build-on-release.yml. If you don't know what I'm talking about, I discourage you to continue without having a deeper understanding. However, if you're feeling lucky just run |
Thanks for helping me. I was able to compile the file using the docker method, then took the swipe-navigation.js file from the dist folder, copied it to my-ha-config/www/community/hass-swipe-navigation. I then restart HA and cleared my frontend cache in the iOS companion app, loaded the dashboard, no luck, it did not work. I added "swipe_back_index: security" and it did not honor the path. Below is the structure I used. Any advice?
|
d7d82c1
to
770ea0f
Compare
Just checking in here. How long do you think it will be before we can use this super awesome feature? :-) |
@albinmedoc @zanna-37 what's current status? Do you plan finish this? |
-- Work in progress --
I have started to allow specifying the exact tab index when swiping. This allow more customizations for the user.
It would allow the user to swipe from tab 10 to tab 1 in one swipe.
I'm having trouble loading the configuration, and would need some help, the rest should work fine.
A view has two additional configurations:
string
: is a path to a tabnumber
: is the index of a tabnull
: disables swipeundefined
: default behaviour (prev/next tab accordingly)