wikitree / wikitree-browser-extension Goto Github PK
View Code? Open in Web Editor NEWBrowser extension that adds advanced features to WikiTree.com.
License: MIT License
Browser extension that adds advanced features to WikiTree.com.
License: MIT License
User-suggested.
If a user has this feature selected, the styling of the site will change to "dark mode".
Examples of the current WikiTree styles are here: https://www.wikitree.com/css/examples.html
It is obvious that editing addon need to be added to the editing toolbar. I have a menu with submenus with multiple options to execute,, AGC optionally shows the buttons, I am sure others will want to add something near the toolbar.
We need to set some standard or we will soon run out of space.
1) Where to put the menu?
My idea is to add a few buttons to the right of the toolbar and each would have a dropdown menu with multiple options.
Top level buttons could be
2) Top items in menu:
BIO | SOURCES | TEMPLATES | CLEANUP | MISC
Bio would have biography writers, timeline creators, ...
Sources would have most of the items from Sourcerer and Paste sources from WT+ extension.
Template would have all template options from WT+
Cleanup would hold AGC item, my Automated corrections (What EditBOT corrects)
And Misc would have all that doesn't fit into the first 4 groups.
3) Different menus on each page type.
On other types of pages (Space, Category, Template, Other) the added buttons would be different like I have different options for each page type. For instance Category pages would get EditBOT operations, and other differences are usefull.
4) Menu Definition:
I have the menus defined in my extension, but the implementation and definition should be moved to the core folder where we would also define the content similar to the main menu.
Any thoughts or ideas about this.
Aleš
Describe the bug
#addCategoryInput is displaying beside #editToolbarExt instead of underneath on Category Pages.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
#addCategoryInput should display underneath #editToolbarExt on Category: pages as it does on Space: and other profile pages.
Desktop (please complete the following information):
It is important to at least agree on an indentation style and a brace layout style.
There are different ways to do it but I would suggest reorganizing the folder structure so that the Chrome extension itself is in a subfolder. That way it is easy to make a zip file to submit to be published. There is no reason to be publishing your readme file and test framework etc.
I'm seeing issues with displays of names:
I found 3 bugs in the feature.
I think you should start preview if the user stops moving the mouse on a link for a second.
You also open the page in two steps. first a narow window, that laters extends to a wide one. can't you hide (not show) the window until the page is retrieved.
The page is not displayed as it should be. I think it inherits the formating of the link. For instance on Bold link, the displayed content is bolded. I also saw green or red content and with differnt font size.
Aleš
I noticed that pageProfile is set to true also on some nonprofile pages. For instance on
https://www.wikitree.com/wiki/Space:Data_Doctors_Report_2022-10-02
it causes the timeline to display.
The problem is in regex: /(/wiki/)\w.-[0-9]/g where "." should be "[^:]". This regex /(/wiki/)\w[^:]-[0-9]/g should exclude all other namespaces.
Aleš
In first line of the relationship box where the relationship should be displayed, I am getting just "Your"
For my nephiew
Your
Your common ancestor, Jelena (Stupica) Trtnik (1942-), is his grandmother.
Your common ancestor, Mitja Dimitrij Trtnik (1940-1994), is his grandfather.
Aleš
Describe the bug
#myCustomMenuContainer is forced below the WikiTree Logo / G2G images.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
#myCustomMenuContainer should be inline with the other menu items.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Describe the bug
To Reproduce
Steps to reproduce the behavior:
After updating to v15 I got an error on extension reload. With dist folder and with published zip file.
After Inspecting view in service worker I found this error
Error in event handler: ReferenceError: window is not defined
at chrome-extension://aicngmhgodhjdeiblaikecebkoaaoaac/background.js:7:5
And clicking the code link returns
chrome.runtime.onInstalled.addListener(function (details) {
if (details.reason == "install") {
chrome.runtime.openOptionsPage();
window.open("https://www.wikitree.com/wiki/Space:WikiTree_Browser_Extension%22);
} else if (details.reason == "update") {
// Remove the slashes below after a significant update (e.g. a new feature).
window.open("https://www.wikitree.com/wiki/Space:WikiTree_Browser_Extension_Update%22);
}
});
I think the error was on 2nd window.open command. The extension otherwise works.
We did agree to use Prettier for code formatting. How about syntax checking.
Today I tried esLint and after making it work, I corrected a few errors, that would cause errors in Chrome.
I intend to use it, but it would be usefull for others. I am sure some of you are already using it.
Or are you using something else?
Should we have a common configuration for it?
Since requests to my server are piling up, I decided to manage it centraly for everyone.
I created wtPlusAPI.js library, that handles WT+ requests.
I would like some info on these questions:
First two functions will be
/********************************************************************
wtAPIProfileSearch Retrieve profile IDs based on the query.
Parameters:
callerID: Prefarably unique name of the caller: "RandomProfile"
query: Words to search for: "Oak Hill Alabama"
params: { Optional parameters.
maxProfiles: Default: 10000
pageSize: Default: 100000
pageIdx: Default: 0
}
Returns: JS object
{
// For successful find
"response": {
"found": 195,
"more": true,
"profiles": [
151444,
...
]
}
// For no match
"response": {
"found": 0
}
}
*******************************************************************/
and
/********************************************************************
wtAPICatCIBSearch Retrieve CategoryInfoBox categories
Parameters:
callerID: Prefarably unique name of the caller: "CategoryPicker"
cibType: Type of CategoryInfoBox: "Cemetery"
query: Words to search for: "Oak Hill Alabama"
Returns: JS object:
{
// For successful find
"response": {
"found": 10,
"categories": [
{
"category": "Oak Hill Cemetery, Atmore, Alabama",
"name": "Oak Hill Cemetery",
"parent": "Escambia County, Alabama, Cemeteries",
"gParent": "Alabama, Cemeteries",
"ggParent": "United States, Cemeteries",
"location": "Atmore, Alabama",
"locationParent": "Escambia County, Alabama"
},
...
]
}
// For no match
"response": {
"found": 0
}
}
*******************************************************************/
All features are turned off by default, so we should direct them to the options page after they install the extension so they can choose which features they want.
Now after initial release, we should have a what's new more exposed. I am having trouble finding it.
We need to write instructions on where to describe new things.
As I am searching arround I found:
=== v.1.0.1.3 (Development) ===
* WikiTree+ Edit Helper
** Added Cemetery Category Picker that also searches in aka and locations defined in CategoryInfoBox on Cemetery category.
:: Additional description in new paragraph
=== v.1.0.1.2 (Preview) 2022-11-03 (UTC) ===
* '''Category Display'''
Changes the location of Categories to the top of the Bio.
=== v.1.0.1.1 (Preview) 2022-11-03 (UTC) ===
* '''G2G Options'''
** Checkmarks to show questions you have visited
== v.1.0.1.0 initial Release 2022-11-03 (UTC) ==
Let's say the option name is bolded if it is a new option
If you need to write 2 paragraphs use :: at the beggining of the line.
When new ZIP files are prepared, the Development changes to Preview and new Development is added at the top with version increased by 1.
What are your thoughts?
I've found an unusual condition that makes the source preview feature throw errors. If a profile doesn't have a tag, but it does have inline references, and you do a preview, and then hover over a reference number, the source preview feature throws this error:
sourcepreview.js:17 Uncaught TypeError: Cannot read properties of null (reading 'innerHTML') at HTMLElement.<anonymous> (sourcepreview.js:17:1) at HTMLElement.handle (jquery.js:5895:1) at HTMLElement.dispatch (jquery.js:5430:1) at elemData.handle (jquery.js:5234:1) (anonymous) @ sourcepreview.js:17 handle @ jquery.js:5895 dispatch @ jquery.js:5430 elemData.handle @ jquery.js:5234
Currently the bioCheck extension will check the profile from the Edit page. Add the ability to check the sources that are entered on the Add Person page, and provide some message (TBD) if the source is not adequate.
The category display feature places categories at the top of profiles. This implemented with a default setting to remove the border.
Add options to:
NOTE: this is something that I plan to work on myself if I have time.
Is your feature request related to a problem? Please describe.
When a profile contains a link to an Ancestry or FindMyPast record or image then it points to a specific domain. E.g. ancestry.com or ancestry.co.uk. If the user's subscription is on a different domain then clicking on the link asks them to sign up for an Ancestry account.
Describe the solution you'd like
When the profile page loads it would (if this feature is enabled) find all such links and redirect them to the user's preferred domain.
The preferred domain for each site would be set in the options for this feature.
Describe alternatives you've considered
I have partially addressed this in the WikiTree Sourcer extension using a context menu. The user can right-click on the link and select the option "Sourcer: Open link in new tab" and it will use the domain set in the Sourcer options.
The on/off options on the Options page aren't saving in the Firefox version of the extension.
It may have something to do with using the recommended options_ui in the firefox version of the manifest instead of options_page.
Describe the bug
Custom Change Summarychanges appearance of the save button on Category pages. Probably also on other types of pages.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Save button should not change.
This is a CSS style changing the appearance
#wpSave,
#wpSaveDraft {
font-size: 1em;
padding: 0.5em;
}
I guess the CSS shouldn't be loaded if it does nothing on the page.
The extension has been at version 0.1.0 since it was created.
We should come up with a system for when that number gets incremented.
Semantic versioning uses MAJOR.MINOR.PATCH numbering.
What should be considered a MAJOR change?
What should be considered a MINOR change?
What should be considered a PATCH?
Maybe MAJOR should be when a large amount of code gets changed, such as when we switched to an npm-based project. MINOR could be when a new feature is introduced. PATCH would be for bug fixes or other minor tweaks.
Should it be incremented whenever code is merged into the development branch? Or when there is an official release? Some other time?
Thoughts?
See also:
Source Previews are limited to wiki/WTID pages and do not function in edit previews (...index.php?title=Special:EditPerson&u=732070) or public/message pages (index.php?title=Lincoln-103&public=1).
The stuff in the WikiTree+ manifest file https://github.com/wikitree/wikitree-browser-extension/blob/development/features/wt%2B/manifest.json needs to be integrated into the main manifest file https://github.com/wikitree/wikitree-browser-extension/blob/development/manifest.json.
Is your feature request related to a problem? Please describe.
See https://www.wikitree.com/g2g/1490016/geneteka-sources for the initial idea of automatically adding sources. Instead, we can show the suggested sources as "Additional resources".
Describe the solution you'd like
Show an "Additional resources" section next to the biography that is clearly marked as originating from the extension, not the biography itself. The source of this information would be in a file hosted on apps.wikitree.com
Describe alternatives you've considered
Additional context
Example screenshot of the feature based on the Kolbe-88 profile ("Additional resources" section).
Instead of Other it should be named "My WikiTree" where items related to users pages would be placed.
The option "Other / Sort Badges" is the first candidate, Maybe also Watch list related things and so on.
Aleš
Buttons HIDE CLUB BADGES and MOVE CLUB BADGES DOWN are shown also on
https://www.wikitree.com/index.php?title=Special:Badges&b=2210_club1000
You should limit it only to
https://www.wikitree.com/index.php?title=Special:Badges&u=
page.
The list of people at the bottom of your (any) profile has an organization, mostly alphabetic (except for the primary profile which is always first) - BUT - wouldn't it be nice if .... you could SORT the list by # of degrees away you are instead? ALSO, wouldn't it be nice if there were the option to format the list as a bulleted list, one person per line, so it was easier to find someone - and not get distracted by line breaks in between first and last names (or names and degrees) ?
AND ... while we're at it (bonus WIBNI) - wouldn't it be nice if there were an additional icon for those who were not only connected by a number of degrees, but actually RELATED to you as a (likely distant) cousin!
Anyone ready to tackle that?
The AGC feature within the extension has a set of options to control its behavior. This is how the options show up in the WikiTree AGC extension:
I would like to add these options into the WBE options user interface. This will require some design work and probably some redesign of the current options code. So I'm opening this issue to discuss the design before starting on the coding.
I can try to design it such that each feature can register a set of options and the common code handles saving and restoring the options and building the user interface (HTML page) for the options. This is how the wikitree-sourcer extension works and it is very modular. To add options for a new site in Sourcer the only change needed in shared code is to add one import line.
A few UI design choices have been mentioned.
Here is a screen shot of the Sourcer options page:
Any thoughts?
From a discussion during the WikiTree Day: The Future of Genealogy Discussion Panel II, look at adding support/display of Soundex encoding.
Add BioCheck button on Watchlist to start the BioCheck app (https://apps.wikitree.com/apps/sands1865/biocheck/?action=checkWatchlist&checkStart=auto)
Club badges are usually piling up in the badges display.
Ideally there would be a button on user's profile next to the badges to "HIDE CLUB BADGES". It would mark all club 100 and club 1000 badges from display.
If that is a problem we could have a button on
https://www.wikitree.com/index.php?title=Special:Badges
to hide all club badges. Or maybe leave the one for previous month.
Another good addition on https://www.wikitree.com/index.php?title=Special:Badges would be to move all club babges to the end. Or maybe leave the one for previous month at the top.
I would recomend a different system. Options should be 3 state. On / Off / Default.
Default would be defined by a developer when a modul is fully tested and all bugs corrected.
I think that functions that are connected to hints, hower or othervise alter the behavior and look of the page should always be defaulted to Off and user could turn them on if he wants. Inserting new clickable options in menus or "buttons" on the page could be defaulted to On when functional.
That way after instaling the extension users would already have some functionality available.
Aleš
Originally posted by @Lesko987 in #13 (comment)
At the top of the page next to the top menu is a menu titled "App Features".
Currently, only one feature uses this, the Printer Friendly View.
We should remove the "App Features" menu and put the link to the Printer Friendly View somewhere else, maybe in one of the existing menus.
It looks like this is because in src/core/editToolbarProfileOptions.js where it says:
title: "WikiTree Apps",
There is no featureid specified.
Describe the bug
.theClipboardButtons appear in random positions on the page depending on the page type or mode (edit) being viewed. Positioning is also inconsistent on the same page types and mode; Profile-1 Edit Mode is different than Profile-2 Edit Mode - see screenshots #4 and #5.
Expected behavior
.theClipboardButtons should appear in a consistent location.
Screenshots
Desktop (please complete the following information):
So users who install the extension for the first time should be directed to configure the options.
What is the mechanism for notifying users when a new feature has been incorporated and there are more options to be configured?
Originally posted by @ke4tch in #13 (comment)
When I implemented the options system I only switched the agc feature to use checkIfFeatureEnabled
rather than chrome.storage.sync.get
directly. This was so tha people could see how to use it.
Since then several other features have switched over to use it.
So I can now go through all the remaining features and switch them over.
Describe the bug
I am getting this error in debug console after I click Descendants button on any profile.
Uncaught ReferenceError: theLIS is not defined collapsibleDescendantsTree.js:13
at collapsibleDescendantsTree.js:13:1
at NodeList.forEach ()
at collapsibleDescendantsTree.js:11:1
at Array.forEach ()
at MutationObserver. (collapsibleDescendantsTree.js:10:1)
If you hover on one link, and then without clicking outside the box and hover on another link, you end up with multiple overlapping previews.
Originally posted by @Lesko987 in #25 (comment)
The G2G thread about the new extension has questions from users (of both Chrome and Firefox) about how to configure the extension.
We should have some concise, simple directions for configuration.
Where should this go? If they haven't figured out how to install the extension, it can't go in the extension. A G2G post would get stale very quickly. So the extension is separate from the core, but should there be some basic help about how to find, install, and open configuration page for the extension on the Help pages?
Is your feature request related to a problem? Please describe.
Not a problem exactly but WikiTree pages can seem rather cluttered when you just want to browse through the tree and read profiles. For example I would like to be able to hide the whole right hand column that shows all the linked images among other things.
Describe the solution you'd like
Something called "Reading mode" or "Minimal mode". It would have several options where the user can select what they want hidden in reading mode.
This is probably something that the user wants to easily toggle on and off without going to the options. So, when the feature is enabled, there would be a toggle button near the top of the profile that toggles reading mode on and off.
Describe alternatives you've considered
This is different to the "printer Friendly Bio" since that produces a PDF. In reading mode:
Reading mode would stay on when you moved from profile to profile until you toggled it off.
Additional context
Things that could be optionally hidden in reading mode (these would be individual checkboxes on the options for reading mode):
Possible interactions
This feature might be incompatible with other features that modify the profile layout.
I think the 2nd link [move Club badges down] below the badges on the profile page is not needed. Hide option is enough. The "move Club badges down" on Badges page is more than enough.
That is a great option, but it is available only on profiles. I already needed it on Category page, but since the categorisation is done on all pages, it should work everywhere.
I would also suggest different image. The one used I understand more like location related thing. Like Pin on the map.
Aleš
#86 introduced hiding/sorting buttons on Special:Badges with:
if ($("body.page-Special_Badges").length) {
...
}
Suggest moving to URL or Text detection to prevent badges showing on badge feed pages, such as https://www.wikitree.com/index.php?title=Special:Badges&b=coordinator.
From G2G:
Preview of space page is covering the link to the space page. When the profile 'preview' box is shown by hovering over the link, we still have the option to click on the link, which I think would be advisable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.