Skip to content

OCT2025_2 | BASMA MALAININE | PISCINE#74

Open
basmalainine wants to merge 36 commits intoCodeYourFuture:mainfrom
DraftRoman:main
Open

OCT2025_2 | BASMA MALAININE | PISCINE#74
basmalainine wants to merge 36 commits intoCodeYourFuture:mainfrom
DraftRoman:main

Conversation

@basmalainine
Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

DraftRoman and others added 30 commits February 23, 2026 11:44
….html

create script.js
- just test getDay(), new Date()  ... methods
style.css :
-  display: grid
- basic structure
fix generate-ical.mjs
update index.html to merch with dynamic structure in the future
…yNumber)

- made months array - for having the name of the month not it's index
- made days of the week array - for having the name of the day of the week not it's index
renderCalendar function :

Takes the year and month as parameters
- clean everything inside the section
- create div and h5 with names of the week and rendering them
- create variable to check what day of the week the first day of the month is.
- create variable for length of the month
- for now create emply div for days before the first day of the month
- rendering days of the month

renderDay function:
- for now create buttons for each day of the month
- add class days
- add text with the number  and rendering them
renderMonth is show current month
- if today is matching with some day of selected month it will be showed
- button next now change the current month and show next month
- button previous now change the current month and show previous month
CSS
- for today some different style
- class for days of the week
HTML
- the month-value now dynamic and buttons previous/next month
rendering year between 1950 and 2050, current year selected.
The even listener renderCalendar of the selectedYear and displayed Month
Lighthouse score is 100 now
Now showed the whole first/last week including somedays of previous/next month
Create a basic structure for a spell checker
- create a button and add event listener to it.
- grab the text from the text area and pass to the spell checking function. Which for now just pass it to split the text function which returns array of words .
Next step will be to create a function which will check do these words are in the dictionary
use Set method because it's quicker then include
This function returns the array of objects { word: "word", isCorrect: true/false }
Naming:
- text  - textarea
- checkBtn  - button
Function splitTheText now clean everything which is not a word characters. These are A-Z a-z 0-9. Or not a whitespace characters such as tab, space, new line.
- textSection  now just section
- created label and .html for
- created div for result

function renderResult(checkedWords, container)
- clean div
- create "span" for every word and if it not from dictionary  underline red
…vent listener

 function addWordToDictionary(word)
- check if the word is part of the word array or not
- if it's not push to the array

If word isn't correct create a button near which on click triggered the function
- remove the special style
- remove the button
in common.mjs was two different ways how to work with words. Now it's through Set and set methods

Index.html:
- has language
- meta data
- title
main and footer
Script.js:
the number of words in the dictionary now is changing when the new word added, if the page is updated starts from the start
Set the tests for Dictionary functions :
✔ Dictionary size is correct (0.6138ms)
✔ Known words are marked as correct (0.1171ms)
✔ Unknown word is marked as incorrect (0.1163ms)
✔ Case-insensitive check (0.0781ms)
✔ Mixed known and unknown words (0.0744ms)
✔ Adding a new word to the dictionary (0.0828ms)
✔ Adding a new word is case-insensitive (0.0652ms)
✔ Adding a word that already exists does not change the dictionary size
- move style from Javascript to the style.css
- made some small changes to Javascript
- the extra space is not longer part of span, so it is not underline with the misspelled word
…website

The global and the window.onload now inside the function initUI() because import to the tests from script.mjs failed because of DOM elements tried to import as well.
- Words that begin with capital letters, such as proper nouns and names, now treat as "correct" words and don't be highlighted. For example, "Ali" or "London" .
To the common.test.mjs two more tests:
✔ Splitting text into words (1.0559ms)
✔ Splitting text with multiple spaces and punctuation (0.3963ms)
Added favicon  to the website
-  for now it's only shows the current day
- fixed  the rendering calendar function  when not current year selected
- fixed the today, now it's working after different year was selected and now displayed current month
It's for testing, now every function can be tested separately
function createEvent({ title, date })
 - Universal unique ID - for this event. Using 128 bit and generate key for example "36b8f84d-df4e-4d49-b662-bcde71a8764f"
- title witout extra spaces
- date in format "YYYY-MM-DD" ( isoDate)
- the event for allDay flag
- and time stamp

function saveEvent(event)
- check if in local Storage has "calendarEvents"  (parse concert to the JSON format from String)
- push event to the array
- changed array push to the local Storage  ( set Item takes the first parameter as a key and a second as a value. The object which consists all evets has to be converted to String again)

getAllEvents function
-  returns Item ("calendarEvents") which consists all events  or empty array.

function renderCalendar(month, year)
- on click on the day now create a catching year-month- day send it to the createEvent function and when event created save it and gives the message
deleteEvent function:
- get all events
- and store to the local storage all except the event with eventID
and refresh the calendar

function renderDay(dayNumber) :
now has a div with un ordered list, and all events in that day are in the list
- added a delete button next to event that would be deleted.
- the event listener after click stops and send the event ID to the deleteId function
renderEvents function
- create a list and inside paragraph and delete button
- and reuse it in code
Barcelona | Oct2025-2 | Roman Pavlenko | The Piscine | Week 2
…more holiday / createEvent has discrimination

- founded this repo https://github.com/FraserHamilton/dayjs-recur with a library which solved the flowing day problem easily. Did you that library, but took the idea from there. Latter could refactoring the code with this library
getNthWeekdayOfMonth:
- takes the first and the last days of the month
- create the map for matching the occurrence
- check the day of the week of the first day of the month comparing with the day of the which asked
- adding number of days depends on the occurrence
- making the same for the "last" week day

function downloadHolidays()
- fetching the days from days/json and store return them in json format
created a function for customDictionarySize  and display it in the main, removed it from body and update the number when the new word added
Dresumewill and others added 6 commits March 5, 2026 20:06
Now always the year has selected, and if when the month changed December - January or January - December the months of selected year would be showed
Tests for renderMonth/renderDay functions and year selector - Will calendar
OCT-2025-2 | Roman Pavlenko | The Piscine | Calendar
Barcelona | Oct2025-2 | Roman Pavlenko | The Piscine | Project-Spell-Checker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants