Skip to content

Conversation

dtissot
Copy link

@dtissot dtissot commented Aug 19, 2025

Preliminary observations

In order to run lein figwheel basic successfully, I had the need of installing jdk 8 because of some outdated dependencies of the project, as well as adding a dependency to [org.clojure/tools.nrepl "0.2.13"].
I decided not to push project.clj just in case that there is a different way that the team solves that without affecting the app-level deps.

The port in the URL listed in the readme turned out to be incorrect as it turns out the port that's set in the config file is the 3450. Modified the readme to reflect that.

Objective

I was required to implement a couple of changes in the widgets:

  • Allow datepicker to accept a param that dictates whether it shows Sunday or Monday as the first day of the week
  • Allow textinput to accept a param that dictates the format in which dates are shown

These changes were made trying to not disrupt the current state of affairs and/or patterns already established in the codebase. I feel that more of a team discussion would be needed in order to propose changes and to truly understand the current design and the rationale behind the decisions.

Rationale

In the case of the datepicker task, it was a matter of how the previous and next months were being generated. In order to make it start from Sunday it was necessary to render the previous month from a day earlier than before (as it began on a Monday) and to render the next one with one fewer day in order to preserve the expected dimensions of the matrix.
It was decided to just use a boolean since that would cover the vast majority of cases, and it would still be relatively simple to map a more flexible alternative (like keywords) to different offsets and thus being able to render starting from any day

Regarding the textinput task, it was necessary to identify at what points of the code a default format was being chosen for masking and input/output time conversions, and then using the newly-added date-format property if it'd been passed into the component.
It was decided to add a validation for the date-format field so as to ensure no unexpected behaviors happen, and all possible values for it were tested manually (although informally).

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.

1 participant