Giter VIP home page Giter VIP logo

reckue-langs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reckue-langs's Issues

Other languages support

Now application can actualy work with english, but have problems in other languages.
As example - Chinese:

  • Even if you add hieroglyph - it will be filtred by clear word function. Becouse it idents as one of the special characters (as : , . - and etc).

Single page applications [BUG]

Plugin isnt work correctly with single page applications. Any content that produced after loading page at first - isnt parsing by extention. Need to find way to fix.

Parsing broken styles

Have list of bugs:

  1. Have no background, full popup is link.
    image
  2. Broken width
    image
  3. Strage view
    image

There is more, but i think fix this three will resolve most of them.

Change all word on page

If you change level of some word, other same words on page still at previous level. Need to change them all at once.
After parsing page need to add all words in map. Where all same words will take one cell. So that you can take them and change everything at once.

Add word popup menu

Now when you click on word you add it into wordbook. Need to impruve logic and add popup menu before adding where user can change word before adding.

Move to google translate

When click on word in popup menu user should be redirected to google translate page with selected word in textarea.

Load wordbooks timer

Loading worbooks from storage is the most complex part of application, becouse of async operations.

Wordbook just fails to load before we start to use it. In that case app continue to work without most part of content from storage.

At the moment, the only working solution of async problem i found was to create Timeout before use getWordbook method.

const wordbook = new Wordbook();
wordbook.loadWordbooks();

// We use getWorbooks method only after timeout.
setTimeout(() => { /* here we can use wordbook.getWordbooks()! */ }, 100);

Needs to find another way wait until ending acync opperation.
Or create method for calculate timer depending on the length of storage.
100 ms === ~120 wordbook parts. Now i used only 56, but its will shoot in a leg soon.

Change level in menu [BUG]

After change level and close menu - level in menu is still old value.
Reload page - level in menu change.
But if you open menu before reload page and change it - level will be set at old value and changing after it.

So for changing level now you need to reload page or every time start changing the level from the same place where it was at first time. It doesn't bother me much, but it's still uncomfortable.

Stuck together words

Somethimes spaces are lost in words.
This happens if a space was at the beginning or end of a word.
We dont restore them. Need to find way to fix.
image

Optimize single page listening

Now its works alternately and heavily loads the page.

Need to create some virtual DOM for rerender and start processing only after certain condition.

Wordbook on the top of application

Develop architecture for chain of responsobilities.

start.js must be like this:

const wordbook = new Wordbook();
const application = new Application();
application.start();

Now it looks like:

const wordbook = new Wordbook();
wordbook.set({word: "vocabulary", level: Levels.ADVANCED.name});
wordbook.loadWordbooks().then();


setTimeout(() => {
    chrome.storage.local.get(['enable'], function(app) {
        window.console.log(`Reckue language app: Reach join point with app.enable=${app.enable}`);
        if (app.enable) {
            window.console.log(`Reckue language app: isServerSideParsingEnable=${IS_SERVER_SIDE_PARSING_ENABLE}`);
            if (IS_SERVER_SIDE_PARSING_ENABLE) {
                const htmlAfterParsing = prepareAndSendRequestToServerSideParser("userId", "collectionId");
                updateDom(htmlAfterParsing);
            } else {
                const parser = new Parser();
                const textNodesList = parser.parsePage();
                const parsedTextNodesList = parser.textParsing(textNodesList);
                // Возможность выгрузить текущий wordbook в файл.
                // saveFile(mapToString(wordbook));
                const builder = new DOMBuilder({sl: "en", tl: "ru"});
                builder.rebuildPage(parsedTextNodesList);
            }
        }
    });
}, 100);

After implementation, come back and finalize the ticket!

Edit words in menu

When you add word in wordbook sometimes it's wrong or you can use original version without suffix and postfix. The application can detect them (should at least). Need to add an option to edit it. The manipulation must be exactly the same as delete and create new word (two for one).

Clean numbers

Clear words should be without numbers. It wasnt in high priority, but recently i found out that sometimes style markers merge with words and broke parser. Firstly need to fix markers, but also need to remove numers in clear words.

Stuck algorithm of updating words.

When you open page and forget about it on some time (day or less maybie), updating levels algorithm could stop working.
Need to find out why its going on and fix.

Add unit tests

After every rework of the parsing mechanism, something breaks. Need to add unit tests foreach part of parser.

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.