Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] New for every sentance. #141

Open
nepalivai opened this issue Dec 11, 2023 · 8 comments
Open

[BUG] New for every sentance. #141

nepalivai opened this issue Dec 11, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@nepalivai
Copy link

Describe the bug
When I am typing the same sentence It would be nice for ever world to align in the same format from up to down. As in the screenshot given below when I practice my typing in the easy mode, the first word is always to the first line and distracts me a little as I can't the what I am typing below (#134).

Screenshots of the error
image

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'Practice'
  2. Click on 'Any time duration/ difficulty'
  3. See error

Expected behaviour
When the same line repeats it should end just there and start a new line as shown in the pic below.
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Brave
  • Version: up to date.

Additional context
It would also be nice to see capital lettering from Intermediate and removing "," from Intermediate would be nice, After all, the hard level should have ",".

Expected Solution
This bug can be solved by adding line breaks in code and editing the file containing text.

@nepalivai nepalivai added the bug Something isn't working label Dec 11, 2023
@Bayyana-kiran
Copy link

hello @nepalivai I would like to contribute. Can u assign me for this issue?

@nepalivai
Copy link
Author

@Bayyana-kiran feel free to create a pr if the maintainer merged it congratulations.

@Bayyana-kiran
Copy link

OK I'm working on this

@Bayyana-kiran
Copy link

Can u please explain the problem once briefly? if u don't mind

@nepalivai
Copy link
Author

nepalivai commented Jan 11, 2024

okay. After the sentence ends the new line should be created rather than just adding it to the next line it can be done by either using the <br> tag in where on the code or manually giving enter to some file containing all that info which was copied and pasted. now your task is to find the code where it is paced choose one of the 2 options above and remember what is the expected behavior given above in the image. Got what I said?

  • example:- this is text nowthis is text nowthis is text nowthis is text nowthis is text nowthis is text now
  • expected:- this is text now
    this is text now
    this is text now<br>

@Bayyana-kiran
Copy link

Got it, I think I have tried it...it is working

const makequote = () => {
// get highest wpm of user
let wpm = getwpm();

// get time chosen by the user
const time = getTime();

// if the user has no history, i.e., new user
if (wpm === 0) {
// setting up default difficulty level for a new user
if (easyLvlBtn.checked) {
selectedDifficultyLevel = "easy";
quoteLength = 70 * time;
} else if (interLvlBtn.checked) {
selectedDifficultyLevel = "medium";
quoteLength = 55 * time;
} else if (hardLvlBtn.checked) {
selectedDifficultyLevel = "hard";
quoteLength = 40 * time;
}
} else {
// setting up difficulty level according to user's wpm
if (easyLvlBtn.checked) {
selectedDifficultyLevel = "easy";
quoteLength = (wpm + 8) * time;
} else if (interLvlBtn.checked) {
selectedDifficultyLevel = "medium";
quoteLength = (wpm + 4) * time;
} else if (hardLvlBtn.checked) {
selectedDifficultyLevel = "hard";
quoteLength = (wpm + 2) * time;
}
}

// generate sentences
const sentences = Array.from({ length: 5 }, () =>
makeSentence(selectedDifficultyLevel, quoteLength)
);

// join sentences with line breaks
const formattedQuote = sentences.join("
");

return formattedQuote;
};

@Bayyana-kiran
Copy link

Once check in ur system

@nepalivai
Copy link
Author

@Bayyana-kiran kindly plz send a screenshot and while writing code use " ` " * 3 sign

make it easier to understand

sdfasdj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants