-
Notifications
You must be signed in to change notification settings - Fork 2
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
[PR] Edit timer
#196
[PR] Edit timer
#196
Conversation
Even though this feature should be and is super simple to implement, I'm getting the go around implementing proper form validation and getting updated structs from the LiveView to the Phoenix server so I can update timers with their IDs. This shouldn't be hard but it's weird because the way I'll keep trying |
@LuchoTurtle thanks for opening this PR to track/share your progress! 🎉 |
Adding parser and error handling. Broadcasting doesn't work properly.
Slow progress so far, from the user story perspective. Since I was practically obliged to use Bluzkly's datetime parser gist (even more so if we are in the future wanting to accommodate other formats), since I was stuck with sending error feedback from the server to the form, I tried to focus on testing what I had done. Since I have to test this parser, I had to battle a bit with VSCode to try and get debugging working but I never did (got this |
Please don't worry about things taking longer than you expected. ⏳ If you want to remote pair on anything please LMK (I'm always available!) 👨💻 |
The missing two lines are dependent on the feedback to the form and broadcast of information.
Just finished all possible test coverage. The two lines that are missing relate to the final stretch: feedback to user and a peculiar situation that happens when I broadcast the new |
Editing times is mostly working for me but I occasionally get these errors: [error] GenServer #PID<0.722.0> terminating
** (FunctionClauseError) no function clause matching in NaiveDateTime.compare/2
(elixir 1.14.1) lib/calendar/naive_datetime.ex:1025: NaiveDateTime.compare(~N[2022-11-16 17:21:07], nil)
(app 1.0.0) lib/app/timer.ex:205: anonymous fn/4 in App.Timer.update_timer_inside_changeset_list/3
(elixir 1.14.1) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(app 1.0.0) lib/app/timer.ex:199: App.Timer.update_timer_inside_changeset_list/3
(app 1.0.0) lib/app_web/live/app_live.ex:143: AppWeb.AppLive.handle_event/3
(phoenix_live_view 0.18.2) lib/phoenix_live_view/channel.ex:382: anonymous fn/3 in Phoenix.LiveView.Channel.view_handle_event/3
(telemetry 1.1.0) /mvp/deps/telemetry/src/telemetry.erl:320: :telemetry.span/3
(phoenix_live_view 0.18.2) lib/phoenix_live_view/channel.ex:216: Phoenix.LiveView.Channel.handle_info/2
(stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
(stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
(stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3 The UI does not display an error and everything appears to continue working. |
Thanks for taking a look at this. 👌 |
I pushed the tests to 100% coverage @nelsonic . It seems this commit broke some auth tests :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these update @LuchoTurtle 👌
Edit Timer MVP Looking good. Might require some UI/UX iteration. 💭
But let's get some feedback from @iteles & @Stephanymtr ASAP.
Working in Thanks again @LuchoTurtle 🙌 |
Should close #195
Still a work in progress. The user when editing an item will see a list of timers that he can edit.