Skip to content

Commit

Permalink
finishing up release candidate. Added setting for tooltips, mocked ba…
Browse files Browse the repository at this point in the history
…ck up setting, mocked support-zone overlay, tightened settings margins to fit more in
  • Loading branch information
tconfrey committed May 8, 2024
1 parent 02f819d commit ec7025a
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 25 deletions.
38 changes: 34 additions & 4 deletions app/bt.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
top: 52px;
height: 200px;
}
.settingsActions hr{
margin-top: 10px;
margin-bottom: 10px;
.settingsActions hr {
margin-top: 7px;
margin-bottom: 7px;
border: none;
border-top: 1px solid rgba(255, 255, 255, 0.4);
margin-left: 25px;
Expand Down Expand Up @@ -455,6 +455,33 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
margin-top: 15px;
margin-bottom: 15px;
}
#settingsBackups {
margin-top: 10px;
font-size: 12px;
opacity: 0.6;
}
#settingsBackups input {
position: relative;
top: 2px;
}
#youShallNotPass {
position: absolute;
width: 98%;
height: 400px;
top: 242px;left: 3px;
z-index: 5;
background-color: #888;
opacity: 50%;
border: solid;
border-width: 2px;
border-color: #DDD;
}
#warningBanner {
position: relative;
top: 40px;
font-size: 80px;
transform: rotate(-45deg);
}
#help {
position: fixed;
bottom: 26px;
Expand All @@ -473,7 +500,7 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
.settingsInput {
display: flex;
justify-content: space-evenly;
margin-top: 10px;
margin-top: 5px;
margin-bottom: 10px;
}
#settings input {
Expand Down Expand Up @@ -811,6 +838,9 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
right: 15px;
filter: invert(1);
}
#youShallNotPass .panelClose {
top: 277px;
}

/* split button for import/export */
.button_text {
Expand Down
7 changes: 4 additions & 3 deletions app/bt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,14 +1159,15 @@ function buttonShow(e) {
const offset = $(this).offset().top;
const rowtop = offset + ($(this).hasClass('branch') ? 3 : 2);

// figure out if tooltips would go off bottom
// figure out if tooltips are on and would go off bottom
const tooltips = configManager.getProp('BTTooltips') == 'ON';
const scrollTop = $(document).scrollTop();
const top = rowtop - scrollTop;
const windowHeight = $(window).height();
const bottomGap = windowHeight - top;
if (bottomGap < 130)
if (tooltips && bottomGap < 130)
$("#buttonRow span").removeClass("wenk--left").addClass("wenk--right");
else
else if (tooltips)
$("#buttonRow span").removeClass("wenk--right").addClass("wenk--left");

// Open/close buttons
Expand Down
30 changes: 28 additions & 2 deletions app/configManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const configManager = (() => {
const Properties = {
'keys': ['CLIENT_ID', 'API_KEY', 'FB_KEY', 'STRIPE_KEY'],
'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome',
'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'],
'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTTooltips', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'],
'orgProps': ['BTCohort', 'BTVersion', 'BTId'],
'stats': ['BTNumTabOperations', 'BTNumSaves', 'BTNumLaunches', 'BTInstallDate', 'BTSessionStartTime', 'BTLastActivityTime', 'BTSessionStartSaves', 'BTSessionStartOps', 'BTDaysOfUse'],
};
Expand Down Expand Up @@ -131,7 +131,7 @@ const configManager = (() => {
};

function updatePrefs() {
// update preferences based on orgProperties read in from file
// update preferences based on configuration

let groupMode = configManager.getProp('BTGroupingMode');
if (groupMode) {
Expand Down Expand Up @@ -174,6 +174,19 @@ const configManager = (() => {
$radio.filter(`[value=${large}]`).prop('checked', true);
document.documentElement.setAttribute('data-size', large);

// Tooltips?
const tooltips = configManager.getProp('BTTooltips') || 'ON';
$radio = $('#tooltipsToggle :radio[name=tooltips]');
$radio.filter(`[value=${tooltips}]`).prop('checked', true);
// do it
if (tooltips == 'ON') {
$("#buttonRow span").removeClass("wenk--off").addClass("wenk--left");
$(".indenter a").removeClass("wenk--off").addClass("wenk--bottom");
} else {
$("#buttonRow span").removeClass("wenk--left").removeClass("wenk--right").addClass("wenk--off");
$(".indenter a").removeClass("wenk--bottom").addClass("wenk--off");
}

// Theme saved or set from OS
const themeSet = configManager.getProp('BTTheme');
const theme = themeSet ||
Expand Down Expand Up @@ -225,6 +238,19 @@ const configManager = (() => {
document.documentElement.setAttribute('data-size', newL);
saveBT();
});
$('#tooltipsToggle :radio').change(function () {
const newT = $(this).val();
configManager.setProp('BTTooltips', newT);
// do it
if (newT == 'ON') {
$("#buttonRow span").removeClass("wenk--off").addClass("wenk--left");
$(".indenter a").removeClass("wenk--off").addClass("wenk--bottom");
} else {
$("#buttonRow span").removeClass("wenk--left").removeClass("wenk--right").addClass("wenk--off");
$(".indenter a").removeClass("wenk--bottom").addClass("wenk--off");
}
saveBT();
});
$('#faviconToggle :radio').change(function () {
const favicons = $(this).val();
const favClass = (favicons == 'ON') ? 'faviconOn' : 'faviconOff';
Expand Down
29 changes: 27 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
</div>
</div>
<div class="settingsActions" id="settings" style="margin-bottom: 5px">
<div id="youShallNotPass">
<img class="panelClose" type="image" alt="Reveal" title="Reveal Supporter Zone"
src="resources/close.png" height="17" width="20"
onclick="$('#youShallNotPass').hide()">
<p id="warningBanner">Supporter<br/>Zone</p>
</div>
<img class="panelClose" type="image" alt="Close" title="Close"
src="resources/close.png" height="17" width="20"
onclick="configManager.toggleSettingsDisplay()">
Expand Down Expand Up @@ -135,6 +141,10 @@
<div class="settingsSubtitle"><span id="syncType"></span> Sync Enabled</div>
<div class="settingsFootnote" id="fileLocation" style="display:none"></div>
<div class="settingsFootnote">Disable current syncing (under Actions) to change this setting</div>
<div id="settingsBackups">
<input type="checkbox" id="backups" disabled>
<label for="backups">Keep last 5 changes, daily backups and monthly backups?</label>
</div>
<hr/>
</div>

Expand Down Expand Up @@ -169,7 +179,7 @@
</div>

<div id="settingsDense">
<div class="settingsSubtitle">Dense?</div>
<div class="settingsSubtitle">Compact?</div>
<div id="denseToggle" class="settingsInput">
<span>
<input type="radio" id="settingsDenseOn" name="dense" value="DENSE" >
Expand Down Expand Up @@ -212,9 +222,24 @@
</div>
<hr/>
</div>

<div id="settingsTooltips">
<div class="settingsSubtitle">Show Tooltips?</div>
<div id="tooltipsToggle" class="settingsInput">
<span>
<input type="radio" id="settingsTooltipsOn" name="tooltips" value="ON" checked>
<label for="settingsLargeOn">Yes</label>
</span>
<span>
<input type="radio" id="settingsTooltipsOff" name="tooltips" value="OFF" >
<label for="settingsTooltipsOff">No</label>
<span>
</div>
<hr/>
</div>

<div id="settingsSubscription">
<div class="settingsSubtitle">License Status:</div>
<div class="settingsSubtitle">Supporter Status:</div>
<div id="settingsSubscriptionAdd">
<div class="settingsSubText">You are using BrainTool for free.<br/>Please consider supporting BrainTool with a purchase. Thank you!</div>
<div id="settingsSubscriptionButtons" class="settingsInput">
Expand Down
3 changes: 3 additions & 0 deletions app/wenk.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ tr.expanded [data-wenk].wenk--bottom:hover:after {
[data-wenk=""]:after {
visibility: hidden !important;
}
[data-wenk].wenk--off:after {
visibility: hidden !important;
}
6 changes: 3 additions & 3 deletions support/releaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ audience: user
# 1.0 Release Candidate
**Note that this section refers to the 1.0 Release Candidate.** It requires a local installation. See further below for 0.9.9a Release Notes. The [discussion group](https://groups.google.com/u/0/g/braintool-discussion) has more details.

This is an early release candidate of the 1.0 version of BrainTool (finally!). It has some significant functional changes and also migrates BT to the latest 'Manifest V3' version of the Chromium browser extension architecture. Given the scale of changes a select user group is being asked to manually install this version and provide feedback. See [Installing BrainTool from source](localInstall) for how to do that.
This is an early release candidate of the 1.0 version of BrainTool (finally!). It has some significant functional changes and also migrates BT to the latest 'Manifest V3' version of the Chromium browser extension architecture. Given the scale of changes we're asking you to manually install this version and provide feedback, in return you can earn a permanent free license. See [Installing BrainTool from source](localInstall) for how to get started, updated contents are described below.

## Manifest V3
This change is not of great interest to a BT user but is mandated by Google (see this [notice](https://developer.chrome.com/blog/resuming-the-transition-to-mv3)) and required non-trivial code changes.
Expand All @@ -27,7 +27,7 @@ As you can see from the screenshot, the expand/collapse buttons and the favicon
## Session saving and Bookmarker Updates
The BT Bookmarker now has the option to save a whole tabgroup (if the current tab is in one), and a complete session, in addition to the previous window and tab options. When saving a session, tab groups are saved as the corresponding BrainTool Topic. Any ungrouped tabs are put in a tabgroup named with a Window-N prefix and saved under a Topic with the same name in the Topic Manager. The Session itself is given a Session-date Topic name and saved under the Topic selected in the Bookmarker or the Scratch default Topic.

## Preferences for Dense, Hide Notes and Large Font
## Preferences for Dense, Hide Notes, Tooltips and Large Font
New preferences have been added for these items.

## New Introductory Screens
Expand All @@ -51,7 +51,7 @@ Another Google mandated update is the change to use their [Auth 2.0](https://dev
## Pricing and License Changes
I'd appreciate feedback on these planned changes:
- There will be no limits on numbers of nodes saved in BT (other than those due to browser storage limits)
- In addition to monthly and yearly subscriptions a single purchase lifetime license will be offered with pricing as follows:
- In addition to monthly and yearly subscriptions a one-time purchase lifetime license will be offered with pricing as follows:
- Monthly $1.33/mo, Yearly $10.66/yr, Lifetime $21
- This (low, low) pricing reflects my goal of having BT be widely used and to encourage users to support its development. The extra change over $1/$10/$20 covers the Stripe transaction costs.
- License enforcement will be as follows:
Expand Down
38 changes: 34 additions & 4 deletions versions/Release-Candidate/app/bt.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
top: 52px;
height: 200px;
}
.settingsActions hr{
margin-top: 10px;
margin-bottom: 10px;
.settingsActions hr {
margin-top: 7px;
margin-bottom: 7px;
border: none;
border-top: 1px solid rgba(255, 255, 255, 0.4);
margin-left: 25px;
Expand Down Expand Up @@ -455,6 +455,33 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
margin-top: 15px;
margin-bottom: 15px;
}
#settingsBackups {
margin-top: 10px;
font-size: 12px;
opacity: 0.6;
}
#settingsBackups input {
position: relative;
top: 2px;
}
#youShallNotPass {
position: absolute;
width: 98%;
height: 400px;
top: 242px;left: 3px;
z-index: 5;
background-color: #888;
opacity: 50%;
border: solid;
border-width: 2px;
border-color: #DDD;
}
#warningBanner {
position: relative;
top: 40px;
font-size: 80px;
transform: rotate(-45deg);
}
#help {
position: fixed;
bottom: 26px;
Expand All @@ -473,7 +500,7 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
.settingsInput {
display: flex;
justify-content: space-evenly;
margin-top: 10px;
margin-top: 5px;
margin-bottom: 10px;
}
#settings input {
Expand Down Expand Up @@ -811,6 +838,9 @@ button:not([disabled]):hover, textarea:not([disabled]):hover {
right: 15px;
filter: invert(1);
}
#youShallNotPass .panelClose {
top: 277px;
}

/* split button for import/export */
.button_text {
Expand Down
7 changes: 4 additions & 3 deletions versions/Release-Candidate/app/bt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,14 +1159,15 @@ function buttonShow(e) {
const offset = $(this).offset().top;
const rowtop = offset + ($(this).hasClass('branch') ? 3 : 2);

// figure out if tooltips would go off bottom
// figure out if tooltips are on and would go off bottom
const tooltips = configManager.getProp('BTTooltips') == 'ON';
const scrollTop = $(document).scrollTop();
const top = rowtop - scrollTop;
const windowHeight = $(window).height();
const bottomGap = windowHeight - top;
if (bottomGap < 130)
if (tooltips && bottomGap < 130)
$("#buttonRow span").removeClass("wenk--left").addClass("wenk--right");
else
else if (tooltips)
$("#buttonRow span").removeClass("wenk--right").addClass("wenk--left");

// Open/close buttons
Expand Down
30 changes: 28 additions & 2 deletions versions/Release-Candidate/app/configManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const configManager = (() => {
const Properties = {
'keys': ['CLIENT_ID', 'API_KEY', 'FB_KEY', 'STRIPE_KEY'],
'localStorageProps': ['BTId', 'BTTimestamp', 'BTFileID', 'BTGDriveConnected', 'BTStats', 'BTLastShownMessageIndex', 'BTManagerHome',
'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'],
'BTTheme', 'BTFavicons', 'BTNotes', 'BTDense', 'BTSize', 'BTTooltips', 'BTGroupingMode', 'BTDontShowIntro', 'BTExpiry'],
'orgProps': ['BTCohort', 'BTVersion', 'BTId'],
'stats': ['BTNumTabOperations', 'BTNumSaves', 'BTNumLaunches', 'BTInstallDate', 'BTSessionStartTime', 'BTLastActivityTime', 'BTSessionStartSaves', 'BTSessionStartOps', 'BTDaysOfUse'],
};
Expand Down Expand Up @@ -131,7 +131,7 @@ const configManager = (() => {
};

function updatePrefs() {
// update preferences based on orgProperties read in from file
// update preferences based on configuration

let groupMode = configManager.getProp('BTGroupingMode');
if (groupMode) {
Expand Down Expand Up @@ -174,6 +174,19 @@ const configManager = (() => {
$radio.filter(`[value=${large}]`).prop('checked', true);
document.documentElement.setAttribute('data-size', large);

// Tooltips?
const tooltips = configManager.getProp('BTTooltips') || 'ON';
$radio = $('#tooltipsToggle :radio[name=tooltips]');
$radio.filter(`[value=${tooltips}]`).prop('checked', true);
// do it
if (tooltips == 'ON') {
$("#buttonRow span").removeClass("wenk--off").addClass("wenk--left");
$(".indenter a").removeClass("wenk--off").addClass("wenk--bottom");
} else {
$("#buttonRow span").removeClass("wenk--left").removeClass("wenk--right").addClass("wenk--off");
$(".indenter a").removeClass("wenk--bottom").addClass("wenk--off");
}

// Theme saved or set from OS
const themeSet = configManager.getProp('BTTheme');
const theme = themeSet ||
Expand Down Expand Up @@ -225,6 +238,19 @@ const configManager = (() => {
document.documentElement.setAttribute('data-size', newL);
saveBT();
});
$('#tooltipsToggle :radio').change(function () {
const newT = $(this).val();
configManager.setProp('BTTooltips', newT);
// do it
if (newT == 'ON') {
$("#buttonRow span").removeClass("wenk--off").addClass("wenk--left");
$(".indenter a").removeClass("wenk--off").addClass("wenk--bottom");
} else {
$("#buttonRow span").removeClass("wenk--left").removeClass("wenk--right").addClass("wenk--off");
$(".indenter a").removeClass("wenk--bottom").addClass("wenk--off");
}
saveBT();
});
$('#faviconToggle :radio').change(function () {
const favicons = $(this).val();
const favClass = (favicons == 'ON') ? 'faviconOn' : 'faviconOff';
Expand Down
Loading

0 comments on commit ec7025a

Please sign in to comment.