weixin_39850787
weixin_39850787
2020-12-05 11:34

Toggle splits

Adds a new button in the accounts views to toggle the visibility of ALL split transactions. This is a global toggle.

http://i.imgur.com/sfGHxmS.png

该提问来源于开源项目:toolkit-for-ynab/toolkit-for-ynab

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39850787 weixin_39850787 5月前

    Ugh. I am still trying to get used to branching and git and pull requests. Not sure what the first changeset is there (I pulled down the main repo changes into my fork, and apparently that became part of my commit?).

    点赞 评论 复制链接分享
  • weixin_39671467 weixin_39671467 5月前

    Just tested this, and I found a couple of bugs: 1. If you start on the budget screen, then click to the accounts view, the button isn't there. 2. If you start on the accounts view, the button is there, but if you click on budget, then back to accounts it's not there anymore...

    We as a team need to find a really good way of injecting content into templates that sticks without polling the DOM. Does a pseudo selector like :before or :after work to add the button in, which you could then attach to with one of these?

    
    $(document).on('click', <selector that matches the css pseudo element>, function(e) { });
    </selector>

    That way the button is always there? I don't have a good answer for this yet, but that's the approach I wanted to take with Major Feature 1 and haven't tested yet.

    点赞 评论 复制链接分享
  • weixin_39850787 weixin_39850787 5月前

    Good find on the toggling of pages. I will have to figure that out.

    I am by far NOT a deep front end dev. I live in the back end, but have enjoyed venturing back up front to mess around on this. I definitely don't have any JS best practices and such. Absolutely relying on some foundation to get going on those things.

    点赞 评论 复制链接分享
  • weixin_39671467 weixin_39671467 5月前

    That's not a worry. I refactored a bit to reference the new style that was better than the one I created initially using setTimeout in one call only. I left it without an option. We can revisit if this outrages people (I doubt it)

    点赞 评论 复制链接分享

相关推荐