Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert options dialog to pure HTML #236

Closed
RealRaven2000 opened this issue Feb 1, 2022 · 12 comments
Closed

Convert options dialog to pure HTML #236

RealRaven2000 opened this issue Feb 1, 2022 · 12 comments
Assignees

Comments

@RealRaven2000
Copy link
Owner

Convert the QuickFolders Preferences dialog to html. This is a big chunk of work, @jobisoft is helping with this.
Dedicated branch for this work:

https://github.com/RealRaven2000/QuickFolders/tree/ESR91-options-html

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 1, 2022

Changes so far:

QuickFolders Options conversion project

<label  />
==> 
<label  for="idOfElement"> </label>

<button />  
==>
<button> 

https://www.w3schools.com/howto/howto_js_tabs.asp

  • label make closing tabs and replace values

30/11/2021
Completed conversion for remaining parts of options.html -
buttons and checkbox labels, i18n, de-chrome (most) icon paths

Pattern:

 <checkbox /> <label value="__myText__"/>
 ==> 
 <label> <input type="checkbox" >__myText__</label>

Next Steps: reference conversion, replace native icons.

  • Can icons from Thunderbird still be accessed by a html page? or do we need to supply copied versions...

roll out all data-pref- changes to all elements.

support or convert !!!

Radiogroups wired up!

<fieldset orient="horizontal">  - changed to class=hbox.
<separator> to <span class="separator">

Support for collapsed attribute:

*[collapsed=true] {
  display: none !important;
}

Added a class for buttons with icons and tabs in order to add icons (behave like list icons):

button[isTab], button.iconButton {
  display: list-item;
  list-style-position: inside;
}

Added test config option to suppress xul options dialog (general debug mode must also be enabled):
extensions.quickfolders.debug.suppressXULoptions

support for sliding alert (accessibility for blind people)

TO DO:

  • wiring up events:

[ ] Version number - open version history

Bling / Layout

initBling( ) function.

  • Themes dropdown
  • all number inputs
  • color pickers

Quick Help - open homepage

Support tab:

  • YouTube channel
  • bug report (open a new mail to support)
  • localization link

License tab:

  • Save Configuration / Load Configuration
  • Advanced Search settings (opens new window)

Miscellaneous

  • reuse existing options window, is this possible?
  • wire up color pickers: at the moment there are no bound prefs - use a background notification for this?
  • convert palette dropdowns to <option> elements
  • white fill color for selected tab.
  • -moz-image-region = seems to be without alternative. (see paste button for license)

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 14, 2022

14/02/2022 - Done today:

Bling / Layout

rewrote initBling( ) and many functions specific to the options screen in a mx-compatible way. I decided to recreated modules with similar / same name space that can exist and be called from a HTML window - see new files:

options-ui.js - QuickFolders.Options
options-preferences.js - QuickFolders.Preferences
options-util.js - QuickFolders.Util
options-interface.js - QuickFolders.Interface (this will likely have to be broken up into multiple files, as the original is 7068 lines long!)

all these have to be sanitized and any references to Services, Cc, Ci and Cu removed. Functionality will be gradually introduced as needed by the options dialog and implented in a more wx-compatible way.

fixed Themes dropdowns
fixed color pickers - these should now work both on Windows & Mac from the new options.html

Combined 2 listeners for notifyTools (from legacy code) and windows message listener (from html windows / API code)
into a single handler - this was done with @jobisoft's help on the Add-on developers call. Test version coming soon!

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 15, 2022

A lot more work was done in today's commit to make a lot of the choices for changes in UI instantly visible:

  • added command handlers for checkboxes, most dropdowns and buttons (WIP)
  • palettes and toolbar background can now be selected correctly
  • added right-click handlers for hidden settings (about:config)
  • Added theme support through the tag
    <meta name="color-scheme" content="dark light">
  • using a global listener in quickfolders-tablistener for "unique" commands that should only be executed once (by one of the main windows)
  • for testing I added a separate menu item to open the classic (xhtml) settings separately this is both for comparison and to set change settings that are not yet supported by the html version:
    image

the global listener should also handle the backup / restore routines as these cannot be done with conventional script / web APIs.

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 15, 2022

15/02/2022
Here is a test version, which may already be valuable to Mac users to be able to set colors:

QuickFolders-mx-5.9pre37.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
For the classic settings use the separate entry on the tools menu (see screenshot in previous comment)

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 16, 2022

16/02/2022 - 5.9pre38

  • fixed relative css paths for preview tabs
  • highlight options with right-click events (on hover, used a class on the containing label)
  • TODO: add tooltip text to elements with right-click handlers (somehow)
  • fixed switch between striped and filled style: layout and update UI .
    to do: fix bad font coloring on colored tabs when switching back to filled style
  • fixed toggle for navigation (current folder) bar
  • implemented [Apply position value]
  • theme selector: fixed hiding / showing configuration elements depending on
  • wired up handlers for all numeric controls
  • fixed type for updateMainWindow parameter "minimal" (boolean instead of string)
  • [Advanced Search settings...] open xhtml dialog for now

to do:

  • current folder bar = close button only visible on hover!
  • change icon on license tab for licensed users
  • Backup / Restore Configuration
  • Copy / Paste Folder String
  • [Defaults] button for Appearance
  • [Default Colors] button
  • [Advanced search settings...] button => convert quickmove.xhtml to html next!!
  • color dropdowns for preview tabs
  • [contact me....] button
  • [buy license] button must open license dialog (still xhtml)

Test version:

QuickFolders-mx-5.9pre38.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
For the classic settings use the separate entry on the tools menu (see screenshot in previous comment)

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 17, 2022

17/02/2022 - 5.9pre39

  • fixed layout of [Buy License] button
  • implemented opening license dialog from buy / update license button
  • fixed icon in License Tab (green pro icon, when paid)
  • implemented [Defaults] button for tab radius
  • implemented [contact me...] button: this requires "compose" permission!
  • implemented [Advanced search settings...] button => convert quickmove.xhtml to html next!!
  • fixed [buy license] button must open license dialog (still xhtml)
  • fixed close button of "current folder bar" (fill-opacity)

Test Version:

QuickFolders-mx-5.9pre39.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
For the classic settings use the separate entry on the tools menu (see screenshot in previous comment)

To do next:

  • Backup / Restore Configuration
  • Copy / Paste Folder String
  • [Default Colors] button
  • color dropdowns for preview tabs
  • fix "transparent" checkbox

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 17, 2022

17/02/2022 - 5.9pre42

  • fixed 2 broken links on support tab.
  • fixed preview of shadow
  • fixed transparent toolbar checkbox

QuickFolders-mx-5.9pre42.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
For the classic settings use the separate entry on the tools menu (see screenshot in previous comment)

To do next:

  • Backup / Restore Configuration + fix icons on buttons
  • Copy / Paste Folder String
  • Implement [Default Colors] button
  • color dropdowns for preview tabs
  • inject heading image from theme?
  • layout: make dialog less wide and safe vertical space
  • if dialog is put to back of window, make sure it is reused / brought to foreground if possible
  • version number should open history

@RealRaven2000
Copy link
Owner Author

18/02/2022 - 5.9pre43

  • implemented version number opening history
  • improved flex layouts + unified font sizes

QuickFolders-mx-5.9pre43.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
To use the old settings dialogs you can use the separate entry on the tools menu:

image

To do:

  • Backup / Restore Configuration + fix icons on buttons
  • Copy / Paste Folder String
  • Implement [Default Colors] button
  • color dropdowns for preview tabs
  • inject heading image from theme?
  • if dialog is put to back of window, make sure it is reused / brought to foreground if possible

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Feb 19, 2022

19/02/2022 - 5.9pre46

  • implemented color dropdown selection panel

image

QuickFolders-mx-5.9pre46.zip

To install, download the zip file and then drag it into Thunderbird Add-ons manager (don't unpack contents).
For the classic settings use the separate entry on the tools menu (see screenshot in previous comment)

to do:

  • move color dropdown closer to the clicked preview tab.
  • maybe close colors panel automatically when the user clicks outside (not sure whether possible). Or add a close button.
  • Copy / Paste Folder String
  • [Default Colors] button
  • inject heading image from theme?
  • If dialog is put to back of window, make sure it is reused / brought to foreground if possible
  • Backup / Restore Configuration

Some of the remaining items are quite hard to implement (especially backup / restore with a possibility of rollback)

@RealRaven2000
Copy link
Owner Author

20/02/2022 - 5.9pre49

  • moved color dropdown closer to the clicked preview tab.
  • [Default Colors] button
  • colors panel closes automatically when the user clicks outside (in bling my tabs area only)

QuickFolders-mx-5.9pre49.zip

to do:

  • Copy / Paste Folder String
  • inject heading image from theme?
  • If dialog is put to back of window, make sure it is reused / brought to foreground if possible
  • Backup / Restore Configuration

@RealRaven2000
Copy link
Owner Author

@RealRaven2000
Copy link
Owner Author

Implemented in 5.9, released on 30/03/2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant