Closed comproperty247 closed 5 years ago
Thanks for the suggestion about putting the maxCrownCount in the crown itself. I had thought about it but wasn't sure it would look a bit cramped. Here a side by side of the original, your version with it in the crown, a larger crown with the font kept its original size, and a slightly larger crown with the total below (more like a traditional fraction).
As for the crown level, I will have to have look at what could be causing it to report level 0 incorrectly. The only problems I can possibly foresee are how bonus skill crowns are counted in the breakdown, they only go up to 1 crown for some reason. It may be the case that a bonus skill that hasn't been bought yet will be counted as crown 0. I will make sure that bonus skills are handled separately.
Hi Toran,
Why don't you create the options page and add those several layouts to extension and let the user decide what is best for him? ;-)
Just found now, out some changes on DL, the class "nh1S1" doesn't exist anymore for Crown count text. is like this now
Perhaps is better to use class "_2eJB1" for now on
About the crown level.. I really don't know what is the main idea you want with this. Because is just crowns on DL...
The issue is like this, I have this value: crownLevelCount=[36, 1, 2, 1, 0, 28]
In the while loop will be False in the first value of the array and will finished and give 0 while (crownLevelCount[i] == 0 && i < 6)
Hope this helps you in some how
Regards, Carlos
I can't edit my own response so I will add the rest of the answer here :-/
If you look on the data return from DL, there is a value which shows the number of levels of each skill "progress_v3.level" as you use and another that is "num_levels".
"num_levels" is the quantity of crowns, USSUALY are 5 but perhaps in bonus skill is another value.
So this can be used to make the math correctly and not use the skills.length5 but by "num_levels".
But please check if is this value "num_levels", I looked on the data some day ago.
Just for curiosity, which Language learning has the bonus skill? Italian seems not to have
Regards, Carlos
Hi Carlos,
Why don't you create the options page and add those several layouts to extension and let the user decide what is best for him? ;-)
It was my intention to give the user the option of enabling any of the features of the extension, so giving a choice of the layout could be included in that. Currently I am using the layout you suggested, the second option in the image I posted previously.
Just found now, out some changes on DL, the class "nh1S1" doesn't exist anymore for Crown count text. is like this now
200 Perhaps is better to use class "_2eJB1" for now on
I had noticed the class change too, bb08809d37c6d614dd36748748270ba71abd0412 & c60153dd059d7e9cf9e1770a847cce43cb31d224 adress this.
About the crown level.. I really don't know what is the main idea you want with this. Because is just crowns on DL...
My aim with the crowns breakdown in to give a sense of what to crown progression is throughout the tree. For example, it shows how many skills you have left at 1 crown, maybe you want to focus on getting those up to 2 crowns. While the crown level may not be important to many people, it does represent the progress of a users tree. Currently, all that is shown is the total, and you would have to scroll down though the whole tree to get a sense of how many skills are at each level. The breakdown just displays this under the total at the top of the page.
Again, if a user is not interested or thinks it unhelpful, they will be able to disable it. I just need to implement these options.
The issue is like this, I have this value: crownLevelCount=[36, 1, 2, 1, 0, 28]
In the while loop will be False in the first value of the array and will finished and give 0 while (crownLevelCount[i] == 0 && i < 6)
As a first note, the crownLevelCount array has be changed slightly as of e89a933018b7de8d128a1d64614d292fb7597856. The structure is now, [array for normal skills, array for bonus skills]. So your new array I believe would be [[36, 1, 2, 1, 0, 28], [0,0]].
The tree level represents the minimum crown level of every skill in the tree. For example, your normal skills are in crownLevelCount[0] = [36, 1, 2, 1, 0, 28], means that you have 36 skills a crown level 0 (i.e. unfinished), 1 skill at crown 1, 2 skills at crown 2, 1 skill at crown 3, no skills at crown 4, and 28 skills at crown 5. This gives a minimum of crown level 0 as you have 36 skills at level 0.
Another example would be my Swedish tree: crownLevelCount[0] = [0, 0, 0, 37, 22, 7]. Again this means, 0 skills at crown levels 0, 1 and 2; 37 skills at crown level 3, 22 at level 4 and 7 at level 5. This means that the Tree level is 3 as that is the minimum crown level that I have any skills at.
This metric mirrors what is shown on duome.eu, such as on the leaderboards for each language, see here for example: https://duome.eu/sv. In the legend on the right it shows the different tree levels, L2, L3, L4 etc.
The code to work out this level is correct I believe, so for your tree, if you have indeed not finished every skill, then the tree is at level 0 as shown.
If you look on the data return from DL, there is a value which shows the number of levels of each skill "progress_v3.level" as you use and another that is "num_levels".
"num_levels" is the quantity of crowns, USSUALY are 5 but perhaps in bonus skill is another value.
So this can be used to make the math correctly and not use the skills.length5 but by "num_levels".
But please check if is this value "num_levels", I looked on the data some day ago.
Thanks for the tip about num_levels, I had not seen this. Looking at the users/ToranSharma data for my spanish tree, it does show that num_levels for bonus skills is 1, i.e. the maximum crown level for a bonus skill is just 1 not 5 like normal skills.
I will consider using num_levels instead of 5 and 1 manually. They currently they will give the same results, and unless duolingo significantly changes how the crowns system works, the added adaptability of using num_levels is fairly low priority.
Just for curiosity, which Language learning has the bonus skill? Italian seems not to have
I am not sure for definite which languages have the bonus skills. I think it is most of the duolingo created tress, including Spanish, French and German. The skills are purchasable from the lingot store. Swedish does not have any either, I have to use a Spanish tree to test how the extension skills handle the bonus skills.
I have changed it so that the tree level does not include the bonus skills, and will make sure that bonus skill breakdowns are not displayed for languages without bonus skills.
Thanks again for your help,
Toran
Hi Toran,
Ok so now I understand the crown level, so mine is 0 until I have at least first level concluded on all skills. As I am doing skill by skill will be zero almost until the end of the tree :-/ At first sight, I thought it was about the sections, but they are just 5. So, your loop with array is correct.
Yesterday I found out that Duolingo, changes the layout,sincerely I didnt like the fonts neither the 3D buttons.
I make a small change in duoStrength.js I am using on my PC. Around Line 400,I added a span element which makes the the sentence until equal sign with same width. See if you like it
var breakdownListItem = document.createElement("li");
breakdownListItem.className = "crownLevelItem";
//Changed line bellow
breakdownListItem.innerHTML = '<span class="half_left" style="min-width: 95px;display: inline-block;">' + skillCount+ " skill"+ ((skillCount == 1 )?"":"s") + " at " + '</span>' ;
Regards, Carlos
PS: as I can not edit again or even paste code with "insert code" button. My posts with code become a little fuzzy to understand :-/
Regards
I never addressed the style change you made the the crowns break down list.
It is worth noting that I have since moved to a git-flow like branching model, and the unreleased features, including the crowns breakdown now live in the develop branch.
In the intervening time, I have changed the display of the list quite substantially. It now uses a grid layout to form regular columns and rows, in a table like manor. I also spent some time experimenting with different text aligns and settled on the current incarnation which looks as follows:
I am quite happy with how this looks.
Regards,
Toran
Hi again :-D
I can't upload, edit, fork and pull, or whatever in your branch for crown, I updated the js file with the last changes and add a small tweak. I put the value for example 145/330 inside the crown image. Seems nicer The "Your tree is at Level 0" I think is not working well, the array with the loop just loops ones and leave, giving level tree=0.
You can contact me if you wish via email by my username of github plus @gmail.com and I can upload the files from there.
Regards, Carlos