GithubHelp home page GithubHelp logo

Rename Router.exit() about cicerone HOT 10 CLOSED

terrakok avatar terrakok commented on July 17, 2024 4
Rename Router.exit()

from cicerone.

Comments (10)

Edward608 avatar Edward608 commented on July 17, 2024 2

I think exit is fairly good for the context of a presenter. As when a presenter calling exit, it means the current presentation is over and the presenter needs to be destroyed. While back somehow means the presenter is still persist and doing its job.

from cicerone.

terrakok avatar terrakok commented on July 17, 2024

No. It will broke backward compatibility. Something difficult for new adept - it is normal 😃

from cicerone.

Jeevuz avatar Jeevuz commented on July 17, 2024

Backward what? Find/replace at the same time you change the library version.

from cicerone.

Jeevuz avatar Jeevuz commented on July 17, 2024

And it's not difficult - It's confusing. Nobody likes to be confused and it's not good for the library.

Let's do some poll in the chat?

from cicerone.

terrakok avatar terrakok commented on July 17, 2024

Poll - it's not good way.
Exit command for screen presenter is more native method than back because it local logic.
I want to leave it as is. For now.

from cicerone.

Jeevuz avatar Jeevuz commented on July 17, 2024

I think you only one who think in this way, this why I think poll is the good way.
And it is as it is now already. I think this issue should be reopened and marked as discussion for other people to express their opinion.

from cicerone.

terrakok avatar terrakok commented on July 17, 2024

Look,
exit - it command will be destroy presenter. Presenter calls router.exit() and ready for destroing.
back - it command is very similar on exit but may be confuse 'cause not return back on previous screen after replace. Do you understand?

from cicerone.

Jeevuz avatar Jeevuz commented on July 17, 2024

Yep, but... we have backTo method too. But the presenter will not be persisted in any way in this case. So we have both cases with different "feelings" here. And this is what makes me a little unhappy with that.
Also, we have not paired methods names. I would prefer to see enter/exit, navigate/back... You get the idea.

from cicerone.

Jeevuz avatar Jeevuz commented on July 17, 2024

Looks like I'm the only one who wants this change ;)
So, I close this discussion. It had enough time.

from cicerone.

RandGor avatar RandGor commented on July 17, 2024

I like how calling
router.exit()
twice for some reason will back (BACK whole app but it is not about to close the one determined presenter) app twice.
That's interesting because it is not possible to exit fragment and open another one:

  1. If you call router.exit before something - it will close current fragment without fulfilling next line of code with opening something other.
  2. If you call router.exit after opening another fragment - good Lord, it will close opened fragment.

I don't think that's what all we want, this problem is my headache for current week...

from cicerone.

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.