Skip to content

Make the root-phrase of the breadcrumb path configurable.#152

Merged
ams-tschoening merged 2 commits intomasterfrom
ghi_150_breadcrumb_root_name
Sep 12, 2021
Merged

Make the root-phrase of the breadcrumb path configurable.#152
ams-tschoening merged 2 commits intomasterfrom
ghi_150_breadcrumb_root_name

Conversation

@ams-tschoening
Copy link
Copy Markdown
Contributor

The approach is to 1. get rid of the hard-coded string and make it a language property instead, so one can have phrases like "(root)" in English, "(wurzel)" in German or some arbitrary other string easily.

Second, a new config is introduced to let WebSVN calculate the name of that root-phrase based on the name of the current repo automatically. that might make sense for a lot of people and is what's actually requested in the linked issue by @didiez.

Third, the breadcrumb path rendered into templates has been splitted into root and non-root, so that templates can decide to use an arbitrary different root or none at all. Before, templates only received the whole rendered breadcrumb, which isn't pretty flexible. Things can easily be reverted with mass-replace anyway.

Fixes #150.

The approach is to 1. get rid of the hard-coded string and make it a language property instead, so one can have phrases like "(root)" in English, "(wurzel)" in German or some arbitrary other string easily.

Second, a new config is introduced to let WebSVN calculate the name of that root-phrase based on the name of the current repo automatically. that might make sense for a lot of people and is what's actually requested in the linked issue by @didiez.

Third, the breadcrumb path rendered into templates has been splitted into root and non-root, so that templates can decide to use an arbitrary different root or none at all. Before, templates only received the whole rendered breadcrumb, which isn't pretty flexible. Things can easily be reverted with mass-replace anyway.

Fixes #150.
Copy link
Copy Markdown
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although nameBreadcrumbRepoRootAsRepo is huge, but I don't have a better name.

@ams-tschoening
Copy link
Copy Markdown
Contributor Author

Agreed, couldn't find something better as well. Some former ideas:

  • nameBcRepoRootAsRepo -> What's Bc?
  • nameRepoRootAsRepo -> Where get things named differently?
  • nameLink[s]RepoRootAsRepo -> Which of the many links?
  • nameMenuRepoRootAsRepo -> Which of the different menus?
  • namePathNavRepoRootAsRepo -> Not that shorter.

@michael-o
Copy link
Copy Markdown
Member

useRepoNameInBreadcrumb? Not much shorter...

@ams-tschoening
Copy link
Copy Markdown
Contributor Author

Yeah, not that much shorter... Additionally, I prefer my scheme of breadcrumbRepoRootAs[...], so it can easily be enhanced in future from maintaining some boolean value to some e.g. string distinguishing the repo name from something additional. Or multiple booleans with different suffixes for As like currently or alike.

Anyway, doesn't seem that important right now and can be changed as necessary in future. What I still did was following the SET+GET naming scheme used for other booleans, looks more consistent now vs. name and getName used before.

@ams-tschoening ams-tschoening merged commit 95c3a94 into master Sep 12, 2021
@ams-tschoening ams-tschoening deleted the ghi_150_breadcrumb_root_name branch September 12, 2021 11:21
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.

Use repository name instead of (root) in the breadcrumbs

3 participants