Skip to content

make "Reduced by ignore patterns" label act like "editIgnoresButton" #4293

Closed

Description

@katrinleinweber

Hello!

Sometimes, when I see a folder's Local State hintin at ignores, I ask myself "Which rules?" and whether I should review them? So, I wondered whether that label could be upgraded with the Edit | Ignore Patterns button's functionality just to shave off that one click from the current click path.

I've not done a lot of publishable HTML or JavaScript, but this seems to me like an easy hack. Would a GUI tweak that hyperlinks the label, or introduces a small button besides it be welcome? And safe to PR against your test suite?

Activity

  1. AudriusButkevicius commented on Aug 8, 2017

    @AudriusButkevicius
    Member

    So personally I'd be against it. There is already the way to do what you want, and I am fine with having one way only to do that.

  2. katrinleinweber commented on Aug 9, 2017

    @katrinleinweber
    Author

    What is the way to do it? On my 1280x800px screen, there's a good chance that Reduced by ignore patterns is "above the fold", so to speak, while the same folder's Edit button is "below." That's one scroll to do. The folder's modal is always larger than the screen is high, so that's always a 2nd scroll. Both could be shaved off by my idea, plus one of the button clicks.

    Alternatively, could the folder panels be upgraded to scroll the view down as much as needed to keep the next folder's panel-heading on-screen?

  3. AudriusButkevicius commented on Aug 9, 2017

    @AudriusButkevicius
    Member

    You should zoom out. Yes, things don't fit in your screen, and you have to click and scroll but that's due to the size of your screen.

    Things won't fit if you have many folders too, but that doesn't means we should pepper clickable things across the screen because of that.

    Your idea brings incosistency, as you can't always click that label as its not always visible. I suspect we'll have people turning up saying "how do I open ignores modal for new folders, the 'reduced by' message is not visible"

  4. katrinleinweber commented on Aug 9, 2017

    @katrinleinweber
    Author

    People who notice my suggested shortcut, would do so only if they first created ignore rules by the standard, long way. That would of course remain in place for all who don't care about a shortcut.
    But for those who do notice the shortcut, it could be a nice touch. Thus, I find the risk of inconsistency or confusion very low, because the two cases remain clearly distinct. Just one of them get's a shortcut.

    About zooming: Do you think it scales better than a shortcut?

    When I look at the stats Number of Folders, I gather that power-users with more folders (more Edit buttons slipping below the screen edge) would need to zoom out farther and farther, and that is limited by font size, isn't it?

    My example is a bit simple maybe, but: At 100% in Chrome on my 800p screen, only the 1st to 4th folder panel is fully visible if expanded. At the same time, the reduced label is visible down to the 7th. That's 75% more folders whose ignore rules would be more conveniently accessible for users above some %ile between the 50th and 95th (maybe 60th %ile). Yeah, it's not a big leap forward, but then again: who doesn't need it can ignore it.

    Also, as I said initially, one alternative GUI idea would be to make an expanding folder panel keep itself above the fold entirely.

  5. AudriusButkevicius commented on Aug 9, 2017

    @AudriusButkevicius
    Member

    So anyways, I am against this, as we are solving your specific small screen problem. I guess it's your opinion against mine, so lets see if someone else from the team/users has anything to say about this. If I am the only one who thinks this is cluttering UI for everyone to help people who are not bothered to scroll on small screens, then I'll shut up.

  6. AudriusButkevicius commented on Aug 9, 2017

    @AudriusButkevicius
    Member

    Syncthings UI is a train wreck anyway by the way, so less clutter the better imho.

  7. katrinleinweber commented on Aug 9, 2017

    @katrinleinweber
    Author

    You're also solving my specific syncing needs that I can't be bothered to solve with thumb-drives ;-p

  8. calmh commented on Aug 9, 2017

    @calmh
    Member
  9. AudriusButkevicius commented on Aug 9, 2017

    @AudriusButkevicius
    Member

    Well, it was not a train wreck when you started started, but then we just kept bolting stuff on top as modals that pop up when you click weird things, so I guess this would just be yet another weird thing you can click on that produces magic.

  10. calmh commented on Aug 9, 2017

    @calmh
    Member

    Fair enough. I think the magic factor is low enough that this is not a WTF, regardless. But I agree that the GUI is an organic accretion of stuff, and about as palatable as that sounds. It would benefit from a rethink. But we can accrete more stuff in the meantime. ;)

  11. added
    enhancement
    on Aug 9, 2017
  12. added this to the milestone on Aug 9, 2017
  13. calmh commented on Aug 9, 2017

    @calmh
    Member

    Also, as I said initially, one alternative GUI idea would be to make an expanding folder panel keep itself above the fold entirely.

    I'd be perfectly fine with the screen scrolling down to actually show the whole section when a folder or device is expanded, provided the folder/device header isn't scrolled off screen. (I don't think you mean "keep itself" as literally as preventing scrolling away, or sticking with the viewport instead of scrolling with the actual page. That would be confusing.)

  14. katrinleinweber commented on Aug 9, 2017

    @katrinleinweber
    Author

    Yes, "keep itself" was meant as "scroll the view in that moment", not "stick to anything".
    I'll work on the shortcut on the weekend.

  15. katrinleinweber commented on Aug 13, 2017

    @katrinleinweber
    Author

    The above would not make a good PR :-/ I got it to work on the 2nd click, after one has opened the ignore patterns the usual way once.

    When adding copying the button's parameters ng-click="editingExisting ? editIgnores() : editIgnoresOnAddingFolder()" ng-disabled="folderEditor.$invalid", and when adding folder.id in either or both function calls, a click on the label produces the error:

    TypeError: Cannot read property 'path' of undefined
        at Scope.$scope.editIgnoresOnAddingFolder (syncthingController.js:1664)
        at angular.js:10223
        at extend.constant (angular.js:9973)
        at angular.js:17859
        at Scope.$eval (angular.js:11974)
        at Scope.$apply (angular.js:12074)
        at HTMLAnchorElement.<anonymous> (angular.js:17858)
        at HTMLAnchorElement.dispatch (jquery-2.2.2.js:4755)
        at HTMLAnchorElement.elemData.handle (jquery-2.2.2.js:4567)
    

    This is as far as I got, after a HTML & CSS tutorial. Those didn't prepare me for JavaScript errors ;-D I'm not sure how to puzzle together.

    • this path to fix this error, and
    • the CSS class to make harmonise the now hyper-linked label's style with the other hyper-links,

    but I can't invest more time into JS in the foreseeable future, I'm sorry. Anyone who wants to try further may of course build on the above :-) Otherwise, feel free to close this for now.

  16. removed this from the milestone on Feb 11, 2018
  17. added a commit that references this issue on Oct 5, 2021
    c8b6dd4
  18. added a commit that references this issue on Oct 20, 2021
    cb607e8
  19. katrinleinweber commented on Oct 23, 2021

    @katrinleinweber
    Author

    Thank you @imsodin & @tomasz1986 :-)

  20. imsodin commented on Oct 23, 2021

    @imsodin
    Member

    Credit goes to @tomasz1986 , I just merged :)

  21. added this to the v1.18.4 milestone on Oct 27, 2021
  22. added 2 commits that reference this issue on Nov 22, 2021
    d1a36c2
    a9c9fb1
  23. added
    frozen-due-to-age
    on Mar 10, 2023
  24. locked and limited conversation to collaborators on Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions