Closed smog-root closed 2 weeks ago
Ok...fix the issues
Can you make it level2?? It's worth it. I'm fixing multiple issues in this!! @kvcops
I mean these are very small minor issues...that can be fixed within minutes...
Though it seems these are multiple but all of them are just issues that can be fixed easily ...so I am sorry that I can't add it to level 2
@kvcops okay. I can do that. But you didn't add labels to my last PR too!! Please add the labels to my last PR and assign me!!
Ok...will add it up
1. Duplicate Code in
DOMContentLoaded
Event:2. Message Scrolling Enhancement:
You have two scrolling functions:
scrollToBottom
andsmoothScrollToBottom
, but it seemssmoothScrollToBottom
is the intended method. You can replace calls toscrollToBottom
withsmoothScrollToBottom
to ensure a consistent, smooth scrolling experience.3. Unnecessary Re-declarations:
messagesContainer
,userInput
, andsendButton
are declared twice. Since they’re used globally within the script, you only need to define them once.4. Optimizing the
appendMessage
Function:appendMessage
function already handles scrolling, but it might be cleaner to pass control tosmoothScrollToBottom
as an internal helper within that function.Kindly add gssoc-ext with level and hacktoberfest-accepted labels @kvcops