Giter VIP home page Giter VIP logo

drafts's People

Contributors

fadelakin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drafts's Issues

Make it easier to place the cursor at the end of the text

When I have a draft saved that is shorter than the screen, such as these three lines of text:

List

First

When I tap that draft in the list to start editing it, the cursor is placed at the beginning of the text, like |List. But almost always I want to add something at the end. I think the cursor should be placed at the end by default when the draft is opened, like First|.

As a second, related request, when the cursor is not at the end, I think tapping below the last line of a draft should move the cursor to the end of the text. Currently, tapping below the last line does nothing. That is, when I touch here in this text-based mockup of my screen:

← Create New Draft   Save ⋮
---
|List

First


⚞TOUCH⚟

---
[keyboard]

Currently, the cursor doesn’t move. But I want the cursor to move to the end, like this:

← Create New Draft   Save ⋮
---
List

First|




---
[keyboard]

I’m not sure how Android’s UI system works, but if it’s like the web, it might be possible to achieve that by styling the multi-line text field to always take the full visible height of the screen, minus the height of the toolbar. Another way to say it is that the toolbar should have a defined height and the text field should fill the remainder of the screen.

Don’t ask “Save draft?” unless the text has been edited

When I open a draft by double-clicking it, then change my mind and hit Back without typing any text, I am still prompted with this alert:

Save draft?
[Discard] [Save]

This alert should only be shown if the text at the moment I hit Back is different from the text as it was when I first opened the draft.

For the Discard feature to work, you must already be saving the original text when I first open the draft. So this feature should only need one extra if, plus a call to your discard function in the alternative branch. In pseudo-code:

if (textField.currentValue.equals(draftModel.originalValue)) {
    discard();
} else {
    // show prompt and save or discard as you currently do
}

Menu item “Delete” does nothing in Create New Draft

When I click the (+) action button to create a new draft, the toolbar still contains the three vertical dots for the overflow menu:

← Create New Draft  Save ⋮

Clicking it shows a menu with one item, Delete, the same as when editing a note:

← Create Ne[ Delete      ]

But since I got here by creating a new note, Delete does nothing, instead of deleting the saved note like normal.

The solution I think makes the most sense is to rename the menu item to “Discard” in this case. I think “Discard” is better than “Delete” for this case because “Delete” implies the draft was already saved. When this menu item Discard is chosen, it would act the same as choosing Discard from the “Save draft?” prompt that appears if I click the Back button after entering text.

Toolbar title still says “Create New Draft” when editing an existing draft

After I tap a draft in the list to edit it, the toolbar looks like this:

← Create New Draft   Save ⋮

The title “Create New Draft” is only appropriate for the interface after touching the (+) button to create a new draft. When editing an existing draft, the title should be something like “Edit Draft”:

← Edit Draft         Save ⋮

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.