Giter VIP home page Giter VIP logo

Comments (4)

Madis0 avatar Madis0 commented on July 25, 2024

Cool implementation, but I think it would make more sense to just change the icon of Synced Tabs when it's present in the toolbar (instead of removing and creating a new element), as user can move the button anywhere in Firefox.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

I wanted to remove the private browsing icon from the tab bar and in order to do so, I needed to make sure the private browsing icon was always visible somewhere in private browsing mode. I settled on this implementation because as per Chrome's behaviour, the incognito icon replaces the profile icon. In Chrome, the profile icon is always present but in Firefox, someone can remove it altogether (and this is in fact the default state) so I force hide the profile icon, regardless of its location, and show the incognito icon next to the hamburger menu.

Perhaps a better way to accomplish this might be to check the toolbars for the sync-button and if present, change its icon and set pointer-events: none, otherwise show the icon as a pseudo element like it is now. This way, if someone has gone to the trouble of putting the sync-button somewhere specific, it will remain there but show the incognito icon, and if they never added the sync-button, add it for them next to the hamburger menu as per Chrome's behaviour.

Alternatively, I could force the sync-button to always be next to the hamburger menu if it is in the toolbar but this artificially limits the level of customisation Firefox users have come to expect, for the sake of consistency.

from materialfox.

Madis0 avatar Madis0 commented on July 25, 2024

Perhaps a better way to accomplish this might be to check the toolbars for the sync-button and if present, change its icon and set pointer-events: none , otherwise show the icon as a pseudo element like it is now. This way, if someone has gone to the trouble of putting the sync-button somewhere specific, it will remain there but show the incognito icon, and if they never added the sync-button , add it for them next to the hamburger menu as per Chrome's behaviour.

Yup, that's what I was thinking about. But only if it doesn't introduce more XBL (only CSS), because that's getting removed soon.

from materialfox.

muckSponge avatar muckSponge commented on July 25, 2024

Since Mozilla introduced the account button, I've replaced that icon with the incognito icon when in private browsing mode. To keep in line with Chrome's behaviour, the button shows a "Private" label. I can't replicate the menu itself so I've disabled the button.

Note, this isn't going to play nice with non-English locales due to the hard-coded label and I'm not willing to translate into every possible locale just yet so I only show the label for English locales.

See 5d9065e, f7edf56.

from materialfox.

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.