CentreForDigitalHumanities / CentreForDigitalHumanities/backbone-util

UserMixin includes methods for which the necessary settings might be missing

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

As @BeritJanssen pointed out in https://github.com/CentreForDigitalHumanities/backbone-util/pull/1#pullrequestreview-2057248290, it is currently possible to obtain a user mixin that has a `login` method but no `loginUrl`. This is not great from an interface design perspective.

One possible solution would be to make all settings required. However, this would be inconvenient for users who do not need all methods. For example, you might only need `login`, but would still have to specify the `confirmRegistrationUrl` setting.

Another possible solution, suggested by @BeritJanssen in https://github.com/CentreForDigitalHumanities/backbone-util/pull/1#discussion_r1602882951, is to prune any methods that are missing a necessary setting.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the UserMixin implementation and the settings discussed in pull request #1 and its review comments. The issue presents two possible approaches but does not choose one or name a file or test; done requires agreeing on the interface behavior and verifying that methods cannot remain available without their necessary settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.