SnoozeTabs icon indicating copy to clipboard operation
SnoozeTabs copied to clipboard

This evening option, prefferably with customizable time

Open bubblefoil opened this issue 6 years ago • 15 comments

I use my laptop both at work and home. Often I open a tab which I would like to get back to after work. Which is in the evening. Which sounds like "later today", although this option puts the tab off by just a few hours and I have to re-snooze the tabs repeatedly throughout the day. I agree I could use the calendar but I am not a fan of this tiny mouse-wheel-scrollable combo, it is just too user unfriendly. Evening hours are too far down, scrolling with a wheel feels imprecise. I would prefer either a radial menu or an option to start dragging over the number to change it like with a slider.

bubblefoil avatar Apr 12 '18 06:04 bubblefoil

"This evening" should be a setting whenever it's between 9-5, and "next morning" when it's outside 9-5 :-)

unhammer avatar Aug 30 '18 08:08 unhammer

The UI of choosing time is unusable. Why not make a more standard one, where one can:

  • write time in (eg. 9, 9pm, 18, 16:52, 1652)

image

demoklion avatar Feb 10 '19 09:02 demoklion

Letting the user create custom snooze times would be a solution for a lot of requests here. This https://addons.mozilla.org/en-US/firefox/addon/snooze-tabby/?src=search unfortunately not open source and not really working addon for snoozing allows this for example. Having a fixed time (today at 9pm) and also an offset option (in 24hrs) would be really handy. Should I rather create a new issue for this proposal?

xuiqzy avatar May 19 '19 12:05 xuiqzy

I'd like to add this - can any maintainers get me up to speed on the process here?

Looks like we'd have to edit:

src/icons

  • Add new icon

Eg, an evening version of the "Later Today" icon:

image

src/lib/time.js

  • Pick an id and locale message name (eg, evening and timeEvening)
  • Extend the times const on lines 10 - 18
  • Extend the case statement on lines 27 - 56

This is where a configurability requirement could begin to make things tricky. For now I'd say lets leave it out.

src/popup/snooze.html

  • Prettyprint html
  • Add a This Evening item

Likewise, the popup would need significant work to add any kind of configurability of individual items.

locales/**/snoozetabs.properties

  • Add a timeEvening message
  • Localize message

I don't know anything about localizing at this time. Note however that if we allow users to configure their own items, we can reduce localization work.

maxsu avatar Sep 01 '19 09:09 maxsu

@xuiqzy adding configurable times sounds like a good goal. Want to collaborate on that?

Questions:

  1. How do users specify time and date offsets? Ideas:
    • Fixed time of day + n days in the future (easy)
    • Time offset (+hours, minutes days) (easy)
    • Weekday names (medium, due to localization)
    • Custom rules (tricky af)
  2. Can users delete existing rules?
  3. Should users be able to reset rules?
  4. Should users be able to export or sync rules?

@demoklion How would you feel about an analog time picker with ability to type in the time? Wanna collaborate with me here?

image

Also, these do seem like existing issues.

  • Timepicker issue: #374
  • Custom snooze settings: #270

Feel free to drop a comment here, or mention me on one of those issues!

maxsu avatar Sep 01 '19 09:09 maxsu

@maxsu hey, I think the baseline for this could be how gmail on android does this now (minus the swiping interactions and ML smarts in the background). Using standard (or at least common) material components is a good start. They aren't perfect (material is mobile-first), but they're certaintly better than what we have now. check eg. this component in material ui

Custom snooze settings are not that important to me, what's in the plugin now works fine. If choosing custom date/time is easier to do, that solves my issue.

edit: to answer your questions

  1. a+b
  2. yes
  3. yes
  4. yes I expect them to be the same on all my firefoxes

Anything else I can help with? I'm coding noob but UX pro.

demoklion avatar Sep 02 '19 07:09 demoklion

I might actually be able to help with the inner parts. I have written some tampernonkey scripts and would like to learn the process of writing an extension. I am a UI noob, though.

bubblefoil avatar Sep 02 '19 20:09 bubblefoil

I've pushed a commit to a temporary feature branch.

Please review the commit - it's very simple so far. I don't think this will necessarily become a feature of the app, but it's a useful entry point into the code (and of course all are welcome to use my branch or pull the feature).

image

Things to note:

  1. I manually adjusted the height of the app's CSS to accommodate the new entry. Otherwise the app looks like this: image This may need to become automatic if users can add or delete entries. I am somewhat remiss in that I lack the CSS-fu to do this! Help welcome!

  2. I didn't make an effort to localize the additions (even in an automated way). We may need to look into whether pontoon localization is still available, or find another open source localization service. I'd hate to scale back on localization.

To test the code, do:

1a. Clone my project at the feature branch:

git clone -b feature/thisEvening https://github.com/maxsu/SnoozeTabs.git

OR..

1b. Checkout my project as a remote.

cd src/SnoozeTabs git remote add maxsu https://github.com/maxsu/SnoozeTabs.git git checkout maxsu/feature/thisEvening

  1. Build the project in production mode

npm install npm run package

  1. Install as a temporary plugin in Firefox
  • Go to Menu > Add-Ons > Tools for all addons > Load Temporary Addon
  • Load SnoozeTabs/dist/manifest.json

Enjoy!

maxsu avatar Sep 05 '19 13:09 maxsu

Why do I need python to build it?

bubblefoil avatar Sep 17 '19 07:09 bubblefoil

I don't believe you do? What error are you getting that suggests it's missing Python?

bwinton avatar Sep 17 '19 13:09 bwinton

The error said it could not find python.exe. So I added it to paths and the error changed a little, it was still Python related, though. I'm afraid I cannot give you more info, my laptop died recently and I did not have a change to try it again since then.

bubblefoil avatar Sep 25 '19 06:09 bubblefoil

As a user of this addon, would I need to download the updated xpi from elsewhere, or will the official one on AMO get updated in future?

smartfonreddit avatar Oct 01 '19 01:10 smartfonreddit

You have two options currently, both require building my branch of the repo (see my post above).

  1. Run it as a temporary addon (about:debugging > Load Temporary Addon)
  2. Load the xpi into Firefox developer edition (about:config > set xpinstall.signatures.required to false)

Let me know if you get it working, or have trouble. Please post console logs in the latter case.

If you test it and feel the feature merits inclusion into AMO, I'll create a PR.

maxsu avatar Oct 01 '19 07:10 maxsu

Hi, I'm back with a replacement laptop and another attempt to build the forked version. I got the same error, here is the console output and npm log: https://gist.github.com/bubblefoil/f43633e8ff166879661fb0747f595418 https://gist.github.com/bubblefoil/4956939ecef098c480c954de697238c6

bubblefoil avatar Oct 11 '19 13:10 bubblefoil

Thanks for posting logs. I see what's happening - you are working in windows without protective WSL armor*! You are quite brave!

I can replicate your error. Here's what I did to fix it:

  1. Install npm's windows-build-tools, which handles node-gyp's python dependency. (see this guide)

    From admin powershell, do:

    npm install --global production windows-build-tools --vs2015

  2. Open package.json and update node-sass from 3.13.0 to 4.12.

    • Old version of node-sass was not compatible with Windows
  3. Run npm install.

    • You can ignore the peer requirement and optional dependency warnings.
  4. Run npm run package using git bash, if you have it available.

    • If you run this in cmd, you'll see a mv error; despite this error, the web extension will build and appear as a .zip file in the ./web-ext-artifacts directory.
    • In either case, the raw extension's manifest.json will be in ./dist

*) On a side note, the extension is definitely packaged to be built on linux, and in general I've had much better luck working with node, python, etc in microsoft's surprisingly decent WSL environment. You might want to consider moving to that - See instructions for WSL + windows insider + the Ubuntu 18.04 WSL image. To get started with node, see my notes here.

Good luck, and let me know if worked!

maxsu avatar Oct 12 '19 17:10 maxsu