ericberman / MyFlightbookWeb

The website and service for MyFlightbook
48 stars 18 forks source link

Add a new flight after editing #413

Closed KayRJay closed 4 years ago

KayRJay commented 4 years ago

Now that we have a way to "Update and Edit Next/Previous" (thanks to issue 322), it would be handy to be able to "Update and Add New" as well.

Sometimes, when I get my logbook out to add a new flight, I double-check that the previous flight I added is correct. I then update the flight. The next thing I want to do is add a new flight. The proposed feature would save me one whole click!

Just a (very small) thought ...

ericberman commented 4 years ago

Decided on a slightly different approach. In Issue #359, I preserve sort and page. I just added support to include any additional parameters. The main page has an "ft=xxx" query that says which tab to open by default (new flight, totals, currency, analysis, etc.); I'm preserving that. So if you start from the Add Flight page, updating a flight will now take you back to add flight. But ditto totals or currency, etc. Superset of the functionality you're requesting, and entirely implicit.

KayRJay commented 4 years ago

Hmmmm … there appears to be a bug. When I use the drop-down menu from the Logbook listing of flights, it opens the Add Flight page, not the Edit page for the relevant flight.

On Nov 22, 2019, at 1:48 PM, Eric Berman notifications@github.com wrote:

Decided on a slightly different approach. In Issue #359 https://github.com/ericberman/MyFlightbookWeb/issues/359, I preserve sort and page. I just added support to include any additional parameters. The main page has an "ft=xxx" query that says which tab to open by default (new flight, totals, currency, analysis, etc.); I'm preserving that. So if you start from the Add Flight page, updating a flight will now take you back to add flight. But ditto totals or currency, etc. Superset of the functionality you're requesting, and entirely implicit.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ericberman/MyFlightbookWeb/issues/413?email_source=notifications&email_token=AEBRDEDSUJOBMB66YODLTOTQVBHRJA5CNFSM4JO4ET7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE665HI#issuecomment-557706909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBRDEE775GZWJF5RZSK2XLQVBHRJANCNFSM4JO4ET7A.

ericberman commented 4 years ago

huh. I’m not seeing that. Repro steps?

KayRJay commented 4 years ago

Ok, this didn’t happen. My bad.

Edit (from the right menu) when on the top-level Logbook list of flights does in fact go to the proper flight to edit it. My “difficulty” is that the ONLY indication you’re editing a flight rather than adding one is that the flight’s date is the date of the flight I selected. That’s why I was confused. It’s not obvious whether I’m on an ADD Flight page or an EDIT Flight page.

More importantly, I think the implicit approach you’ve chosen (based on my “start page”) for ADDing a flight after EDITing an existing flight (to address my original request) is too subtle. The implicit approach, to me, is not really useful and indeed is quite confusing.

You wrote that if you "start from the Add Flight page, updating a flight will now take you back to add flight”. First, this is not the scenario I was describing. My workflow is to check that recently entered flights are correct before I add a new one. I want to edit my previous couple of flights before I add a new one. So I start from the EDIT process, which always takes me back to EDIT, not to ADD. So the new feature doesn’t work for what I want. I still have to press New Flight to add one.

On the other hand, unless I do intend to add multiple flights, it is unhelpful to remain on the ADD flight page as it now SOMETIMES seems to work. I realize you made this change to address a suggestion of mine (being able to add multiple flights at once), but it shouldn’t be the default. I just logged out, back in and pressed New Flight. I added the flight, and was (apparently) taken back to the Logbook page of flights. I dunno why or how, but SOMETIMES after I add a flight, I’m taken back to the Add Flight page, and can add multiple flights for the same date simply by pressing Add Flight one after another.

Again, I would again suggest you have two buttons, “ADD” and “ADD/NEW” (or some such), to make it obvious what will happen next after I add a flight.

Actually, I’m not entirely sure that the functionality works as you describe, probably because I AM confused. I “started on” the Add Flight page, scrolled down to the (rather unexpected) list of flights at the bottom of the page, hit Edit this flight, did Update, and landed back at the list of flights. Doesn’t look like I was then back to the Add Flight page.

I do understand and appreciate that in some contexts your implicit approach, based on the page I “start on”, may be useful. As for my use case, it isn’t useful for me. By the time I’ve finished adding or editing a flight, I have forgotten what page I “started on”. I’m not even sure what “started on” means.

The fact that the flight’s date is the primary indication whether you’re adding or editing is very subtle. It is entirely possible a user might have two flights on the same day. So, it is very easy to get confused. It would be much more obvious what’s going on if there were a header, like “EDIT FLIGHT” or “ADD FLIGHT” at the top of the page.

Since you do now have "Update and Edit Previous" and “Update and Edit Next”, it seems easy, consistent and obvious to add “Edit and Add New Flight” at the end of the process of updating a flight. It would also directly address my requirement.

I hope you will reconsider.

Thanks

On Nov 22, 2019, at 2:43 PM, Eric Berman notifications@github.com wrote:

huh. I’m not seeing that. Repro steps?

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ericberman/MyFlightbookWeb/issues/413?email_source=notifications&email_token=AEBRDEF47TZJZVSGRZLMRPTQVBOCJA5CNFSM4JO4ET7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7CRDI#issuecomment-557721741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBRDEBVPOXQP65EJFNHWZ3QVBOCJANCNFSM4JO4ET7A.

ericberman commented 4 years ago

There's a few things here. The first is that you say there's no indication whether you're adding or editing a flight other than the date. I disagree - there are multiple indications:

The notion of "from whence you started" is a much more legitimate observation. After all, if you just click on the "Logbook" tab, you can from there expand the "Add" button (which expands the add form without hitting the server) and add a flight. Or, you can go to Logbook->Add Flights, and the "Add" button is already expanded. The difference between the two is indeed pretty darned subtle, I'll agree. The key thing is that the URL is different - just going to the "Logbook" tab has everything collapsed, where as the other items on the list ("Add Flights" , Currency, Totals, etc.) add "ft=..." to the URL to indicate that a particular tab should be opened by default. That's what I'm keying off of It's totally subtle, I agree.

But this allows people to, say, check that their totals match their old paper logbooks and come back to totals, when they find and edit a discrepancy - adding another flight after updating is hardly the only scenario here!

You can do exactly your scenario by starting from Logbook->Add and then collapsing the new flight form (again, expand/collapse doesn't hit the server); doing update will then take you back to the Add page.

There are a few reasons I didn't like adding an "Update and add new" option:

KayRJay commented 4 years ago

My perspective is as a user, thinking of what I see on-screen, not the implementation, screen refresh optimization or thoughts behind the design. Frankly, some of this is so subtle I'm having trouble clearly writing about it. I suspect most users haven't or won't discover this subtle design and take advantage of it. I'd argue that UI optimization is as important (at least in many cases) as run-time optimization or programmer-time optimization.

To respond ...

When you're adding, it's a blank flight entry screen. When you're editing. the route/comments/landings/times are all filled in

True, but not "in your face obvious". Also, I can edit a flight that has nothing but the date.

When you're adding, you're on the main logbook page and have the expanding tab-buttons along the top. When you're editing, that is all stripped away - it's just the flight being edited

I do see that "New Flight" is bolded (which is a subtle indication of where I am) when I am in Add flight mode. I also see that you can toggle the "New Flight" button, which I suppose is useful. And, yeah, I see that LACK of a visible indication when in Edit mode. White space is a pretty subtle "indication" of anything.

Most importantly - when you're adding, the button says "Add". When you're updating, the submit button is "Update" and there is a cancel button.

Sure, but that button is on the bottom of the page, not at the top where I am starting to edit or add a flight. It's an "important" indication of what I'm doing, but it comes at the wrong time ... just before I commit the change.

The notion of "from whence you started" is a much more legitimate observation.

Since "where I started from" is subtle, you could make navigation less subtle with a banner. For editing (where the absence of buttons is a subtle indication that you're on the Edit page), this might be helpful:

Screen Shot 2019-11-24 at 3 08 03 PM

You could make it even more clear what flight we're talking about:

Screen Shot 2019-11-24 at 4 43 36 PM

Yes, that information is redundant (with information several lines down) but it's more "obvious"!

[people can] check that their totals match their old paper logbooks and come back to totals, when they find and edit a discrepancy - adding another flight after updating is hardly the only scenario here!

Add another flight after updating may not be the only scenario here, but it's arguably the most common. For me, I don't manually add the flights on each page, write the totals in the book, then check that MyFlightBook agrees with the page total agrees before adding a flight. I use MyFlightBook to calculate the totals once I've verified that the flights themselves are correct. Besides, totals are per-page, and until each page is full, I wouldn't enter the totals.

I can look at totals, and re-check totals them again after editing a flight. If I've hit "Totals", then update a flight, when I press "Update", I go back to the Totals page. However, this doesn't seem to work for "Currency" or "Analysis".

RE "Update and add new" option ... (Minor) Since that's always an option, it means that the drop-down menu must always be shown. The dropdown is currently not shown if there's no next and no previous.

VERY minor edge case. This only applies when there are no flights at all, right? If the drop-down menu is always there, it doesn't hurt to have the obvious "Update and add new" option. Besides, if I came to edit a flight via the top-level Logbook > Edit this flight, it saves a click on New Flight.

(MInor) It leads to hacky and ambiguous code because the code for "update and go to a new flight" and "update and go to no new flight" actually are undifferentiated: they're both instances of "the flight to navigate to is unspecified", which means I have to distinguish "next flight is new" from "next flight is none". (All right, I admit that's largely my own aesthetics...)

I'm sure I don't understand. But in any case, isn't "Update and add new" just the same as "Update flight" followed by pressing "New Flight" at the top? (This in the case where I hadn't "started from" the "Add flight" page.)

(More significant) - "Add" is already available on the page you go to after hitting update; you just might have to expand it (which - again - doesn't hit the server, so it's very fast). So the functionality is redundant.

The redundancy is minor, and would be helpful from an UI perspective. The redundancy has a (small) value: eliminates the need for one click.

"Update and add new" would be just as efficient (from a system perspective), as it is logically equivalent to pressing the "New flight" button. And, as such, it is more "efficient" in terms of human keystrokes.

(More significant) - "Add" is one of many scenarios (like totals, currency, analysis, etc.) that you might want to go to. It's vastly cleaner and simpler UI to say that "update takes you back to the state you were in before".

Easier to say perhaps, but harder to describe "the state you were in before". Not simpler to understand for the user, given the subtlety. And it doesn't seem to work currently for "Analysis" or "Currency".

(Next/previous, on the other hand, is explicitly a change of state).

Precisely! It's explicit, obvious, and under the direct, immediate control of the user.

Otherwise, suddenly I have to add option for "Update and go to Totals" and "Update and go to Analysis" and such.

You really don't. You can have your cake and eat it too. You could leave the current semantics and behavior, and add only the "Update and add new".

ericberman commented 4 years ago

I'm afraid I'm just not convinced that the distinction between whether you're editing or adding is that big a problem (especially since you have to explicitly choose "edit" to get to an edit screen).

You're misunderstanding the totals scenario; it's actually quite a common one. People will import (or enter one-by-one) their flights from paper, and then double check that the import worked by comparing their totals to what got imported. Not the per-page totals, their all-time totals. It's not uncommon for things to be off a little bit - either due to math errors from paper, or missing a data field or putting it in the wrong box, etc.; so they'll find the error, fix the flight, then go back to totals to see if things are all aligned or if other issues remain. Similar scenario with analysis for professional pilots checking how much flying they've done each month.

The architectural issues of course are not (and should not be) a concern of the end-user; that's why I labelled them "minor". The background on that is simply that the code that knows how to edit a flight knows nothing about "do something after updating." It has 2 things it can do: (a) it can notify it's host "hey a flight was updated", and (b) it can tell the host that a specific flight (provided originally by the host!) has also been selected to be "next." So the idea is that the host page provides the next or previous flight to the flight-editing code, which then passes it back if that option is selected. An "empty" flight simply means that the update button was hit (i.e., not "update AND edit next/previous"), so you should return to whatever view the host deems appropriate for its context. At the moment, there's no way to distinguish an "empty" flight (no "next" action) from a "new" flight (update and edit new). Totally solvable problem, just a bit of a hack that touches a surprising amount of code. (Oh, and it actually is pretty common to hide the drop-down, since "next/previous" is determined by your active search and sort order, so even if you have thousands of flights, if you do a search that results in just a single flight and edit that, then it's appropriate to lose the dropdown since there is no next or previous for that flight given the search criteria. But that too is indeed minor).

In any case, expanding the "New Flight" button after updating a flight is a single click and fast, so the optimization here seems really minor.

KayRJay commented 4 years ago

I'll grant that NONE of this is of MAJOR importance. I said as much at the outset: "Just a (very small) thought ..."

However, I would argue that improvements in the UI are often worth doing, even if there is only a minor benefit, and even if there is a modest amount of work to do or a minimal performance impact. Your approach to issues like this seems to weigh internal (or perhaps design philosophy) issues more heavily than UI issues.

There would be little cost, no confusion and a (small) benefit to having the drop-down always present "Update and add new". The options to "Update and Edit Next" or "Update and Edit Previous" could continue to be displayed only when there is a "next" or "previous" flight. Making this change would not do any damage to the usage patterns you've described. I don't see the downside of adding this little tweak.

On the other hand, it's obviously your call. If you don't want to do it, for whatever reason, that's of course fine.

By the way, unless I'm mistaken, there is a recent change such that after "Update Flight" is pressed, the system no longer shows the Add Flight or Totals page, and previously did not return to the Currency or Analysis page. Maybe it's just me?

ericberman commented 4 years ago

Update Flight takes you back to the page you were on. Note that there is a distinction between, say, starting from Logbook->Add Flights and starting on Logbook (and then expanding new flight) It's subtle, I agree, but one is a navigation event and the other is simply interacting on the page. The back button on the browser will treat these distinctly as well. So if you start by navigating to Logbook->Add flights, then update any flight, it will take you back with the new flight panel expanded. If you start by navigating to Logbook (no subtab; all of the bar items collapsed), it will not.

ericberman commented 4 years ago

Anyhow, the internal stuff is not remotely a deciding factor; I was just putting it out there. Obviously, the internal code needs to bend to meet the requirements of the scenario you want to address, not the other way around.

I'm just really unconvinced that this scenario needs to be further optimized, since it is already a single click (on "New Flight") if that's what you want to do next, and because it's not in any way obvious to me that the sceneario of adding a new flight after updating is any more common than multiple other pathways for what people do after updating a flight.

And heck, you'd really just be pushing the extra mouse motion a bit earlier, since you have to hover over the drop-menu anyhow to expose the menu then move it to choose "update and next".

KayRJay commented 4 years ago

We've spent a lot of pixels on this discussion. I'm done!