Skip to content

Commit dba67a1

Browse files
authored
Merge branch 'main' into trans-guide
2 parents 9f1674b + 9af905f commit dba67a1

File tree

2 files changed

+290
-1
lines changed
  • content/blog/entries

2 files changed

+290
-1
lines changed

content/blog/entries/2025-07-11-refactoring-the-cc-chooser-pt-1/contents.lr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ series: 2025-chooser-refactor
1212
pub_date: 2025-07-11
1313
---
1414
body:
15+
This blog is part one of a three part series: [Refactoring and Releasing the
16+
new CC Chooser](/blog/series/2025-chooser-refactor/).
17+
1518
We’re excited to announce that we have finally moved the Chooser from a
1619
long-term beta state into a finished and stable v1.0. But it certainly hasn’t
1720
been a straight-line. The Chooser has been met with a lot of challenges along
@@ -136,4 +139,4 @@ implemented!
136139

137140
[cc-website]: https://creativecommons.org/share-your-work/
138141
[chooser]: https://creativecommons.org/choose/
139-
[open-verse]: https://openverse.org/
142+
[open-verse]: https://openverse.org/
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
title: Refactoring and Releasing the new CC Chooser: Part 2
2+
---
3+
categories:
4+
open-source
5+
cc-chooser
6+
cc-vocabulary
7+
---
8+
author: sara
9+
---
10+
series: 2025-chooser-refactor
11+
---
12+
pub_date: 2025-10-06
13+
---
14+
body:
15+
This blog is part two of a three part series: [Refactoring and Releasing the
16+
new CC Chooser](/blog/series/2025-chooser-refactor/).
17+
18+
19+
The Creative Commons Chooser 2025 refactor offers a number of improvements
20+
across the surface of the application. Wherever possible we tried to consider
21+
if the footprint or implementation could be more straightforward and simple and
22+
then worked from there. The end goal being an application that would be
23+
considerably more flexible in its upkeep and advancement.
24+
25+
## Reevaluating core features and use
26+
27+
This was accomplished by first understanding and reestablishing what the core
28+
set of functionality the Chooser should provide.
29+
30+
We started with the use cases that were present within the 2020 beta Chooser:
31+
32+
1. Provide a license recommendation
33+
2. Passively educate the user about licenses and their properties/use-cases
34+
3. Allow a user, who is an Author, to generate a "mark" in a variety of formats
35+
(which generally meets the requirements of the license)
36+
4. Allow a user, who is a reUser/reMixer, to generate an "attribution" mark
37+
when not adequately provided from the original author
38+
39+
From the above four use cases, 1 & 2 were the original core aims of the Chooser.
40+
41+
Use case 3 was added as a mechanism to make applying the choice easier (but if
42+
the Author doesn't adequately provide a mark with Attribution Information then
43+
reUsers/reMixers may not be able to meet the spirit of the terms of the license
44+
(Attribution being required). The Attribution Details being optional is true in
45+
that it doesn't block a license recommendation, nor the passive education (1 &
46+
2); but if a user is expecting 3 as a main use-case then the Attribution
47+
Details become required, colliding with a contextual expectation.
48+
49+
Use case 4 was not an intention of the Chooser, but something users have ended
50+
up using it regularly for, since Authors will often only use a general marking
51+
statement, such as “This Work is licensed CC-BY”.
52+
53+
Moving forward we would hope to focus on use cases 1-3, with the initial MVP
54+
scope of the Chooser refactor prioritizing 1, and then moving into the other
55+
two as supporting use cases. Use case 4 will not be a primarily supported use
56+
case, but we expect people will continue to use the Chooser for it until a
57+
better tool comes along.
58+
59+
## Turning scope into technical methods
60+
61+
The Chooser spirals outward from the core decision pathways in the stepper
62+
guiding someone through a series of questions and resulting
63+
recommendations.Those pathways have two main branches that fork at the
64+
beginning (Do you need help? Yes/No), and regardless of what comes after,
65+
eventually provide an appropriate recommendation once all required fields are
66+
met.
67+
68+
From there, the Attribution Fields can be filled out and will populate the
69+
Marking section to allow for easier work marking from all the available user
70+
supplied data.
71+
72+
This means the decision stepper is the core piece of technical functionality
73+
that we would need to stabilize first, and everything else would then build
74+
from that standard setup.
75+
76+
We could employ a method of interwoven if/else and/or switch statements that
77+
moved through a series of logic gates checking against combinations of
78+
question/answer pairings combined together into certain recommendations, but in
79+
the case of the Chooser we already know what all the answers are. We know that
80+
the recommendation can be 1 of 7 possible legal tools, and that there are two
81+
main pathways to get to each of those tools from the “Do you know which
82+
license you need? yes/no” question.
83+
84+
If we work backwards from this premise we can standardize these pathways into a
85+
format which can describe the complete decision tree, and then work backwards.
86+
87+
That then looks generally like this:
88+
89+
`[step-1-question]/[answer]/[step-2-question]/[answer]/…/&tool=[tool-req-name]
90+
`
91+
92+
This breaks down into 14 possible correct pathways.
93+
94+
This format lets us describe the pathway state throughout a particular UX, in a
95+
uniform and easily parsable format.
96+
97+
From there we can set up the form to build out a state pathway as questions are
98+
answered, and when a full path matches a possible correct path end state, a
99+
particular recommendation can be accurately made.
100+
101+
Everything else can be assumed to be unknown (non matching).
102+
103+
This gives us a starting point to set up a simple state machine, and check
104+
against routinely at specific events and provide recommendations and/or update
105+
the interface.
106+
Reducing the JavaScript footprint and overhead
107+
108+
Once we no longer needed a complex state management engine because we only have
109+
14 possible correct “states” we’d like to handle, we could move away from
110+
the need for a larger more complex state management framework like Vue.js.
111+
112+
The 2020 beta Chooser utilized Vue.js and its dependency chain, the newer 2025
113+
Chooser refactor utilizes a single vanilla JavaScript (JS) file. This resulted
114+
in approximately a 98% reduction in the amount of JavaScript!
115+
116+
This also lets us dramatically reduce the dependency chain, which in turn makes
117+
the Chooser more secure, more stable, and more maintainable overall.
118+
119+
Running the project through the [SCC tool][scc-tool] shows the newer refactor
120+
would be estimated to cost $113,716 to develop, take 6.02 months, and require
121+
1.68 people to complete.
122+
123+
The refactor planning began in 2024, but the total time from initial refactor
124+
to completion code-wise was approximately 3 months (half the estimated time),
125+
with 1 person working on it part time (due to other obligations and
126+
responsibilities).
127+
128+
The original 2020 beta Chooser run through the SCC tool shows an estimated cost
129+
to develop of 8.88 months, and requiring 3.16 people to complete. This means
130+
not only did the refactor overperform on cost on its own estimations, it
131+
reimplemented the same degree of functionality with 1.8% of the code of the
132+
original, and accomplished what would have taken 3 people to do in 9 months
133+
full-time.
134+
135+
This is good, because the Chooser needs to be more maintainable and stable, but
136+
also flexible enough to build out newer features over time.
137+
138+
The state paths and smaller footprint means that we are left with a minimal
139+
amount of logic required to alter the visual state of the UX, and to allow a
140+
user to move through the stepper, the attribution fields, and the various
141+
marking formats and their individual functionalities.
142+
Embrace native support and semantics
143+
144+
As the decision stepper is the main interaction element, the new markup was
145+
first built from there, setting up a semantic form, grouped into fieldsets, and
146+
labelled accordingly.
147+
148+
The classes in particular let the markup describe each component in a way that
149+
can be more directly tied to the logic the JS will later perform.
150+
151+
There is some measure of dynamic “data + markup” being swapped within the
152+
UX based on user selections. Previously Vue.js packages and their dependencies
153+
would handle holding onto this data.
154+
155+
In the refactor we opted to make use of the `<template>` element, which let us
156+
lean on existing HTML and JS functionality, and also established a foundation
157+
from which more robust Web Components could be utilized later if such a need
158+
arose, giving us a stable path of complexity to follow down the line.
159+
160+
We also opted to avoid the use of popup modals and tabs, and instead leaned on
161+
`<summary>/<details>` elements instead to accomplish similar behavior without
162+
the
163+
need for JS based behavior. Once again keeping our JS footprint much smaller.
164+
165+
## Improving the UX
166+
### Reducing friction
167+
168+
We tried to reduce redundancy and better control friction within the UX
169+
wherever possible in the 2025 refactor.
170+
171+
The prior 2020 beta Chooser had “Next” and “Back” buttons within the
172+
interface which largely had no necessary purpose. The Tool Recommendation was
173+
often updated live as fields were filled out, so the only reason to hit the
174+
Next button was to get more of the input interface to appear, rather than to
175+
get more useful output within the Recommendation area.
176+
177+
With the refactor we removed these buttons, giving the user the ability to move
178+
from fieldset to fieldset within the UX without an additional step in the
179+
process of input. Whether they move forwards or backwards the UX responds
180+
accordingly without the added friction. This lets people move through to a
181+
recommendation much more quickly. This change also lets us remove the
182+
“Reset” button as well, since moving backwards through the fieldsets will
183+
reset lower fieldset values automatically. We also get a boost in accessibility
184+
with its removal, since it’s not advised as a solid use case within
185+
accessible interfaces, due to it being too easily clicked.
186+
187+
“The Web would be a happier place if virtually all Reset buttons were
188+
removed. This button almost never helps users, but often hurts them.” (Reset
189+
and Cancel Buttons - NN/G)
190+
191+
We also removed the final Done button and its adjacent shaking behavior. The
192+
“Done” button had an erroneous purpose, since the recommendation was
193+
already available on the right, and it was unclear why the “Done” button
194+
would be necessary to reach a final UX state.
195+
196+
The shaking behavior is also generally a UX convention deployed to indicate
197+
that an error has occurred or that inadequate or incorrect information has been
198+
input within a form. The original aim with the prior chooser was to draw
199+
attention to the Tool Rec and marking areas being “finished”, but instead
200+
communicated that some form of error had occurred. This was reported multiple
201+
times by users, so this behavior was removed entirely to make things less
202+
confusing and more clear.
203+
204+
The shaking behavior was accompanied by a form of “scroll jacking” which
205+
would scroll the user’s viewport back to the top so the shaking behavior
206+
could be visible when it occurred. This was also removed.
207+
208+
Overall, we also tried to remove the number of steps, clicks, or choices a user
209+
might have to move through to get to a usable recommendation where possible.
210+
One clear example of this is prepopulating the first question with the default
211+
of “Yes”. This means returning users who are already familiar with the
212+
choice can proceed more swiftly without adding any additional steps for those
213+
that still need help.
214+
215+
Attribution marking now shows up as soon as a tool recommendation has been
216+
provided, linking the two together better contextually, and not as a later
217+
phase of the form’s state lifecycle.
218+
219+
### Adding friction
220+
221+
To make the UX more usable we also added friction where it made sense. The
222+
pathway that leads to a CC0 recommendation no longer provides a recommendation
223+
without checking the two acknowledgement checkboxes, to ensure the user is
224+
given the chance to fully understand what they are doing by utilizing CC0.
225+
226+
We also leaned more on the “Need Help?” section to provide deeper
227+
explanations rather than adding more information in other areas. This
228+
section’s newer placement lets it serve as a way to drill down further,
229+
without having to increase the density of information in the fieldsets.
230+
Better related UX element binding and separation
231+
232+
Despite being a rather simple interface the Chooser offers several overlapping
233+
use cases, and as such we tried to find subtle ways to bind distinct areas of
234+
input to related areas of output either with attention focus, or with some
235+
measure of connective mechanisms.
236+
237+
The Attribution fields include descriptive placeholder data, which also shows
238+
up within the various marking formats helping to bind the two areas together as
239+
having an input/output relationship not just generally, but also more
240+
specifically for the individual input fields and output tokens. This allows a
241+
user to start with the Attribution fields and see the results in the Marking
242+
formats, or first encounter the Marking Formats after reaching a Tool
243+
Recommendation, and then make a connection back to the Attribution Fields as
244+
the input source for them. The goal being a bi-directional relationship that is
245+
intuitive.
246+
247+
Another area where this shows up is with the Tool Recommendation itself. When
248+
it appears after a successful set of fieldsets align it is distinctive in its
249+
appearance, but it also has a “waiting for required fields” placeholder
250+
element for the zero state of the UX, so that the shift is more intuitive that
251+
results will appear here once input, and that they are also distinct visually
252+
from the Marking Formats section below.
253+
254+
## Increasing plasticity
255+
256+
The final result of the refactor is a dramatically smaller and more manageable
257+
codebase, a much narrower pathway of function and logic, better integration
258+
with the Vocabulary Design system, and a robust use of semantic accessible
259+
markup. This radical reduction in the code footprint and complexity overall
260+
means the refactored 2025 Chooser is now much more agile and can more easily
261+
grow or pivot in new directions.
262+
263+
## Closing
264+
265+
Overall, the code footprint is now **57.52 times smaller**! If the refactored
266+
codebase's footprint was Earth, then the old codebase's footprint would be Neptune,
267+
since Neptune's volume is 58 times larger than Earth ([you can fit 58 Earths
268+
within Neptune][neptune-earth])
269+
270+
Despite the number of improvements throughout the refactor, one of the key
271+
goals was clearing out enough bitrot and complexity to make room for the
272+
project to grow sensibly and responsibly again. We weren’t just trying to
273+
improve the Chooser for a static launch, but to reposition it so that it could
274+
once again grow more easily in the directions that would benefit its users most.
275+
276+
We already have a bit of a roadmap in mind, and we’ll get into that in the
277+
final installment, **Part 3: Future Growth: What’s next for the Chooser**,
278+
and
279+
what directions we hope to grow it.
280+
281+
[cc-website]: https://creativecommons.org/share-your-work/
282+
[chooser]: https://creativecommons.org/choose/
283+
[chooser-refactor-part1]: /blog/entries/2025-07-11-refactoring-the-cc-chooser-pt-1/
284+
[neptune-earth]: https://www.space.com/41-neptune-the-other-blue-planet-in-our-solar-system.html#:~:text=Neptune%20is%20the%20eighth%20and,Earth's%20volume%2C%20according%20to%20NASA.
285+
[open-verse]: https://openverse.org/
286+
[scc-tool]: https://github.com/boyter/scc

0 commit comments

Comments
 (0)