Coder Social home page Coder Social logo

wikitree / wikitree-browser-extension Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 20.0 24.39 MB

Browser extension that adds advanced features to WikiTree.com.

License: MIT License

CSS 2.05% JavaScript 96.44% HTML 1.36% Swift 0.13% Python 0.02%
genealogy hacktoberfest wikitree

wikitree-browser-extension's People

Contributors

andy5995 avatar david-quadpro avatar dijkgraaf avatar flominatortm avatar harrislineage avatar jmecode avatar jmegenealogy avatar jonathanduke avatar kayveedw avatar ke4tch avatar lesko987 avatar pewu avatar robpavey avatar shogenapps avatar udjeni avatar yachtrocker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wikitree-browser-extension's Issues

Decision on edit addons

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š

#addCategoryInput Display

Describe the bug
#addCategoryInput is displaying beside #editToolbarExt instead of underneath on Category Pages.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Category:Texas
  2. Click on [edit]
  3. Select the addCategory button
  4. See error

image

Expected behavior
#addCategoryInput should display underneath #editToolbarExt on Category: pages as it does on Space: and other profile pages.

image

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Chrome
  • Version: 106.0.5249.119
  • Extension Version: 1.0.1

Display issues with middle names and suffixes

I'm seeing issues with displays of names:

  • Middle names. Some profiles I see nothing for a middle name. On other profiles I see a dot (.) displayed for the middle name when there should be nothing for those profiles.
  • Suffixes not displayed. I have a number of male lines that have a suffix, like "Sr" or "Jr". I don't see these displayed, when it would be helpful to see them to differentiate people at a glance.
  • Suffix sometimes displayed. I have a male line with the same name that goes up to 6 in a row, with roman numerals for the suffix. For some odd reason, I do not see "VI" for one person's profile, but I see "V" on the other profile, but then nothing for "IV". I have confirmed that these are all in the Suffix field. You can see this if you start here (Cornelius Vanover VI): https://www.wikitree.com/wiki/Vanover-69 . It is also this line where I see the dot (.) for the middle name when there shouldn't be anything displayed. See below screenshot:

image

Problems with space page preview

I found 3 bugs in the feature.

  1. It is quite a problem with this for instance on suggestions report
    https://www.wikitree.com/wiki/Space:Data_Doctors_Report_2022-10-02
    where moving a mouse over the first row causes a lot of window openings and they don't all complete and remain opened making it imposible to navigate the page.

I think you should start preview if the user stops moving the mouse on a link for a second.

  1. 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.

  2. 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š

myCustomMenuContainer Display

Describe the bug
#myCustomMenuContainer is forced below the WikiTree Logo / G2G images.

To Reproduce
Steps to reproduce the behavior:

  1. Go to G2G
  2. See error

image

Expected behavior
#myCustomMenuContainer should be inline with the other menu items.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Chrome
  • Version: 106.0.5249.119
  • Extension Version: 1.0.1

"Son of" Bug

Describe the bug

  1. Random family member name links within profile VITALS are being replaced with "Son of".
  2. LNAB is transformed from correct display, to "Son of" to "Parents:"

To Reproduce
Steps to reproduce the behavior:

  1. Disable all extension features
  2. Enable only the Change Family Lists feature
  3. Enable any combination of options with checkboxes 3-5; alternatively disable all options
  4. Navigate to example profile: HRH Prince Philip, Duke of Edinburgh
  5. See error
  6. Navigate through family for other random display examples

Screenshots
image
image
image

Error in Chrome after the update to v15

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.

Common Syntax checking for extension

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?

WikiTree+ API library

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:

  1. Where should the js file be?
  • On src/wtPlus/wtPlusAPI.js
  • or should I place it in public/wtPlus/wtPlusAPI.js
  • or in src/core/wtPlusAPI/wtPlusAPI.js
    or some place else?
  1. Since it might be interesting also for Dynamic Tree Is there a protocol to release it in both githubs or do I have to make it separately?

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
        }
      }
*******************************************************************/

World War II in timeline comes up as World War Ii.

I found a formatting issue where when using the Timeline feature is says "Joined World War Ii" when it should be "Joined World War II" I found the problem and fixed it on my fork of the app already, how can I create a branch and push this change to be looked at?
wwIIvswwIi

What's new protocol

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?

Bug in source preview feature

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

BioCheck Sources for Add Person

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.

Category Display Options

The category display feature places categories at the top of profiles. This implemented with a default setting to remove the border.

Add options to:

  • Enable category container border
    • Allow user to select container display when border is enabled (e.g., box rounded row, box orange rounded row, box green rounded row)
  • Change the category placement to the sidebar above DNA Connections instead of top of profile
    • Allow user to select category display when sidebar placement is enabled (e.g., list item class="star")

Redirect external links

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.

Options aren't saved in Firefox.

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.

Custom Change Summary

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:

  1. Edit a category
  2. https://www.wikitree.com/index.php?title=Category:Stoney_Point_Cemetery%2C_Scranton%2C_Arkansas&action=edit

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.

Decide on versioning.

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 Preview not working on some URL variations

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).

Feature: source suggestions / additional resources

Is your feature request related to a problem? Please describe.

  • suggest sources that are found using automated or semi-automated systems

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

  • automatically add sources to profiles – against WikiTree policy
  • button to show "Additional resources" – might not be discoverable, only some profiles would have this button and the user only learns what is there after clicking it.

Additional context

Example screenshot of the feature based on the Kolbe-88 profile ("Additional resources" section).
image

Rename of Options category Other

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š

Organize List of "Degrees from" people at bottom of profile

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?

Add options interface for AGC options

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:

Screen Shot 2022-10-13 at 10 26 19 AM

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.

  1. A style like WikiTree Sourcer where there could be a tab for each category and within each tab a dropdown for each feature. (See screenshot below)
  2. Like this existing design with all the categories and features in a flat scrollable page but with the ability to expand/collapse on a feature to reveal/hide its options.
  3. To not use the options page at all for an individual feature but have some feature specific way of getting to its options.

Here is a screen shot of the Sourcer options page:
Screen Shot 2022-10-13 at 7 28 48 PM

Any thoughts?

Remove all Club badges from displaying on profile

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.

Have some features default to "On" when a user installs the extension.

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)

.theClipboardButtons Display

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

  1. image
  2. image
  3. image
  4. image
  5. image
  6. image

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Chrome
  • Version: 106.0.5249.119
  • Extension Version: 1.0.1

Switch all existing features to use checkIfFeatureEnabled

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.

collapsibleDescendantsTree: Error in debug window

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)

Multiple Previews

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)

Directions for users to configure extension

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?

Reading mode

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:

  • You can still use links to go to parents, children etc and thus browse the tree.
  • You can still interact in other ways

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):

  1. The right hand column. This would hide the "six columns" div and expand the left column t be the full 16 columns.
  2. All tables in the bio
  3. The Sources section and all inline ref links (e.g. [1])
  4. The 3 lines that name the profile manager and last edited etc.
  5. Possibly the tabs (Edit, Images etc)
  6. All inline images in the bio along with their captions
  7. The memories, comments and matches/merges sections
  8. The line of buttons under the tabs ([Comments ][Family Group][Matches ][Sources])

Possible interactions

This feature might be incompatible with other features that modify the profile layout.

categoryFinderPins: Category Finder Pins Should work on all Edit pages.

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š

Don't cover link when show the space page preview.

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.

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.