From 8bfa14386b8ac6e2244659717a59f5d34276aa5e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 20 Nov 2021 10:06:43 +0100 Subject: [PATCH] Added first Architecture Decision Records --- .dockerignore | 1 + CHANGELOG.md | 4 +- ...-handle-setting-auto-connect-on-servers.md | 51 +++++++++++++++++++ docs/adr/README.md | 5 ++ 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 docs/adr/2021-10-31-how-to-handle-setting-auto-connect-on-servers.md create mode 100644 docs/adr/README.md diff --git a/.dockerignore b/.dockerignore index 63f72310..1d878882 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,4 @@ ./test ./shlink-web-client.gif ./dist +./docs diff --git a/CHANGELOG.md b/CHANGELOG.md index c5d59982..7e059687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org). -## [Unreleased] +## [3.4.1] - 2021-11-20 ### Added -* *Nothing* +* [#525](https://github.com/shlinkio/shlink-web-client/issues/525) Added docs section for Architectural Decision Records, including the one for servers "auto-connect". ### Changed * *Nothing* diff --git a/docs/adr/2021-10-31-how-to-handle-setting-auto-connect-on-servers.md b/docs/adr/2021-10-31-how-to-handle-setting-auto-connect-on-servers.md new file mode 100644 index 00000000..2f1e8a6f --- /dev/null +++ b/docs/adr/2021-10-31-how-to-handle-setting-auto-connect-on-servers.md @@ -0,0 +1,51 @@ +# How to handle setting auto-connect on servers + +* Status: Accepted +* Date: 2021-10-31 + +## Context and problem statement + +A new feature has been requested, to allow auto-connecting to servers. The request specifically mentioned doing it automatically when there's only one server configured, but it can be extended a bit to allow setting an "auto-connect" server, regardless the number of configured servers. + +At all times, no more than one server can be set to "auto-connect" simultaneously. Setting a new one will effectively unset the previous one, if any. + +## Considered option + +* Auto-connect only of there's a single server configured. +* Allow to set the server as "auto-connect" during server creation, edition or import. +* Allow to set the server as "auto-connect" on a separated flow, where the full list of servers can be handled. + +## Decision outcome + +In order to make it more flexible, any server will be allowed to be set as "auto-connect", regardless the amount of configured servers. + +Auto-connect will be handled from the new "Manage servers" section. + +## Pros and Cons of the Options + +### Only one server + +* Good: + * Does not require extending models, and the logic to auto-connect is based on the amount of configured servers. +* Bad: + * It's not flexible enough. + * Makes the app behave differently depending on the amount of configured servers, making it confusing. + +### Auto-connect configured on existing creation/edition/import + +* Good: + * Does not require creating a new section to handle "auto-connect". +* Bad: + * Requires extending the server model with a new prop. + * It's much harder to ensure data consistency, as we need to ensure only one server is set to "auto-connect". + * On import, many servers might have been set to "auto-connect". The expected behavior there can be unclear. + +### Auto-connect configured on new section + +* Good: + * It's much easier to ensure data consistency. + * It's much more clear and predictable, as the UI shows which is the server configured as auto-connect. + * We have controls in a single place to set/unset auto connect on servers, allowing only the proper option based on current state for every server. +* Bad: + * Requires extending the server model with a new prop. + * Requires creating a new section to handle "auto-connect". diff --git a/docs/adr/README.md b/docs/adr/README.md new file mode 100644 index 00000000..86ea34d6 --- /dev/null +++ b/docs/adr/README.md @@ -0,0 +1,5 @@ +# Architectural Decision Records + +Here listed you will find the different architectural decisions taken in the project, including all the reasoning behind it, options considered, and final outcome. + +* [2021-10-31 How to handle setting auto-connect on servers](2021-10-31-how-to-handle-setting-auto-connect-on-servers.md)