Giter Site home page Giter Site logo

UI for adding new coffee about bluum HOT 2 CLOSED

glifchits avatar glifchits commented on May 22, 2024
UI for adding new coffee

from bluum.

Comments (2)

glifchits avatar glifchits commented on May 22, 2024

I implemented some of the basic functionality and navigation. The "Select Roaster" functionality is not great though.

Ideally, tapping "Select Roaster" would transition to a new screen (like a push navigation), and the Select Roaster screen would pop itself off the stack back to the Select screen once the user selects a roaster or cancels the selection.

  • push works, but pop won't let us pass the selected roaster parameter back to the "Add Coffee" screen.
  • if you push then replace to go back, the navigation stack preserves each coffee roaster the user had selected. You keep tapping "Back", going through many "Add Coffee" screens — as many times as you tapped "Select Roaster" — and each screen has the roaster you'd selected at that time.

I settled on calling replace both times. Apparently you can animate the screen transitions separately (see react-navigation/react-navigation#295 (comment)) and implementing the "Back" button could also be done separately.

In a perfect world, we would have a popAndReplace method. Alas, Trump got elected so we're stuck having to do things by ourselves.

from bluum.

glifchits avatar glifchits commented on May 22, 2024

didnt do anything else to it but its more or less functional. Won't build the select roaster screen since it duplicates basically all the functionality and I am not good enough at React native to build a nice reusable abstraction for the "search, select or add" process.

from bluum.

Related Issues (20)

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.