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

Favorite/starred items in the history #32

Closed
martinpopel opened this issue Mar 25, 2022 · 5 comments
Closed

Favorite/starred items in the history #32

martinpopel opened this issue Mar 25, 2022 · 5 comments
Labels
enhancement New feature or request low-priority question Further information is requested

Comments

@martinpopel
Copy link
Member

Each item in the history should have a star button. The button could be added also above the input (or translation?) box.

Starred items could be on top of the history list or they could be visible as suggestions below the input box (even without clicking on the history button).

@martinpopel martinpopel added enhancement New feature or request low-priority labels Mar 25, 2022
@EbrithilNogare EbrithilNogare self-assigned this Mar 28, 2022
EbrithilNogare added a commit that referenced this issue Mar 29, 2022
@EbrithilNogare EbrithilNogare removed their assignment Mar 29, 2022
@EbrithilNogare
Copy link
Collaborator

I added only stars in history menu, not in input box.

Adding new star button to input would be confusing for user, I think.

@EbrithilNogare EbrithilNogare added question Further information is requested waiting to test and close issue is done, but need somebody to check functionality before closing the issue labels Mar 29, 2022
@martinpopel
Copy link
Member Author

martinpopel commented Apr 19, 2022

Thanks. It works for me, so I think it could be deployed.
I have a list of possible improvements:

  • I agree a star button in the input box could be confusing, but it could be in the translation box (only if the translation is not empty, of course), as in Google Translate, or above/below the translation box.
  • The history button should be hidden if there are no items in the history (Hide the history button when no history is available #30).
  • In the history view, only first N characters of each item should be shown (plus "..." indicating cropping) if the input is longer than N. N should be set so that the history window is not wider than the screen and the delete button is always visible. Of course, after clicking on an item, its full version (including newlines) should go into the input box, as it is now. BTW: Google limits the length of starred texts to 300 characters and shows both inputs and translations word-wrapped in a side bar with some extra features (sort, export), but I don't think we need it now.
  • The star button should have a tooltip (perhaps "Save translation" and "Remove from saved"). Similarly, the delete button should have a tooltip "Remove from history". These messages could be later localized to cs/uk depending on the user setting as described in Localize according to the Accept-Language header #29.
  • Some texts are not included in the history (although they were translated). On one hand, these are often variations of previously entered texts (few words/characters added/deleted), so it is nice that the history is not flooded with many versions of the same sentence. On the other hand, sometimes the history is missing even sentences written from scratch (different from any other sentences). What are the rules for including a text into the history? I could only find a rule forbidding exact duplicates, but no near-duplicates detection or "shown for too short time" in the source code.

@martinpopel martinpopel added waiting for deployment and removed waiting to test and close issue is done, but need somebody to check functionality before closing the issue labels Apr 19, 2022
EbrithilNogare added a commit that referenced this issue Apr 19, 2022
@EbrithilNogare
Copy link
Collaborator

EbrithilNogare commented Apr 19, 2022

Dots were added to overflowed text (still keeping its original content).

Tooltips added.

History will save everything after 3 seconds (shortened from 5seconds).
Items in history were never duplicates and now it will not be even prefixes e.g.
Ahoj se ulozi do historie, Ahojky prepise Ahoj, Aho vytvori novy zaznam.
Takze po techto stavech Ahoj -> Ahojky -> Ahojk bude v historii [Ahojk, Ahojky] .

@EbrithilNogare
Copy link
Collaborator

EbrithilNogare commented Apr 20, 2022

there were bug, where css minifier and optimizer makes css rules inconsistent against clear dev builds css.
Now it is fixed.
For testing: long text will have in history triple dots at the end and will not create scroll bar (horizontal)

@EbrithilNogare
Copy link
Collaborator

closing as it is already deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants