couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowalski <>
Subject [GitHub] couchdb-fauxton pull request: Allow editing documents from view
Date Mon, 15 Dec 2014 14:22:14 GMT
Github user robertkowalski commented on the pull request:
    @michellephung @benkeen hi! michelle provided me some steps to reproduce the double rendering/afterRender-called-twice-issue.
Thanks a lot! Here are the step to reproduce for reference:
    1. Place a console.log in the afterRender of the view in question.
    2. Click on a view, (in the sidebar)
    3. Click edit on one of the design-documents shown
    4. Click ‘Back’
    5. Look at the console to see that it is called twice
    here is what happens: in `afterRender` a `triggerRouteEvent` for the queryOptions is called
This will end up in the core, triggering a render, causing the view to render twice (or without
the hack, infinitely): see
    Instead of fixing that with different workarounds I propose to fix the root cause: please
change the `triggerRouteEvent` to a "normal" event-trigger which passes the options to the
queryoptions component (using `FauxtonAPI.trigger` and `this.listenTo`).
    After that we can remove the `hasRenderedOnce` and also the test for empty markup and
don't need any hacks.
    I am happy to help if there are questions!

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message