Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!11215
Use a placeholder for the navigation render menu.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Use a placeholder for the navigation render menu.
issue/drupal-3498922:3498922-post-render
into
11.x
Overview
12
Commits
12
Pipelines
14
Changes
7
Closed
catch
requested to merge
issue/drupal-3498922:3498922-post-render
into
11.x
2 months ago
Overview
12
Commits
12
Pipelines
14
Changes
7
Expand
Closes
#3498922
0
0
Merge request reports
Compare
11.x
version 13
1caab5b4
2 months ago
version 12
f729b610
2 months ago
version 11
e777cb69
2 months ago
version 10
b6809482
2 months ago
version 9
b7585b14
2 months ago
version 8
37840109
2 months ago
version 7
bbe3c20b
2 months ago
version 6
9c85e04f
2 months ago
version 5
07cd6d8b
2 months ago
version 4
44f044ef
2 months ago
version 3
b4819f16
2 months ago
version 2
ae836730
2 months ago
version 1
646e080c
2 months ago
11.x (base)
and
latest version
latest version
c7bbb61f
12 commits,
1 month ago
version 13
1caab5b4
11 commits,
2 months ago
version 12
f729b610
10 commits,
2 months ago
version 11
e777cb69
11 commits,
2 months ago
version 10
b6809482
10 commits,
2 months ago
version 9
b7585b14
9 commits,
2 months ago
version 8
37840109
8 commits,
2 months ago
version 7
bbe3c20b
7 commits,
2 months ago
version 6
9c85e04f
6 commits,
2 months ago
version 5
07cd6d8b
5 commits,
2 months ago
version 4
44f044ef
4 commits,
2 months ago
version 3
b4819f16
3 commits,
2 months ago
version 2
ae836730
2 commits,
2 months ago
version 1
646e080c
1 commit,
2 months ago
7 files
+
49
−
145
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
core/modules/navigation/js/user-block.js deleted
100644 → 0
+
0
−
38
Options
/**
* @file
*
* Customizes the user block to use the current username without affecting
* caching.
*/
((
Drupal
,
drupalSettings
,
once
)
=>
{
/**
* Replaces the generic 'My Account' text with the actual username.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Sets the username.
*/
Drupal
.
behaviors
.
navigationUsername
=
{
attach
:
(
context
,
settings
)
=>
{
if
(
!
settings
?.
navigation
?.
user
)
{
return
;
}
once
(
'
user-block
'
,
'
[data-user-block]
'
,
context
).
forEach
((
userBlock
)
=>
{
userBlock
.
querySelectorAll
(
'
.toolbar-popover__control, .toolbar-popover__header
'
,
)
.
forEach
((
button
)
=>
{
const
buttonLabel
=
button
.
querySelector
(
'
[data-toolbar-text]
'
);
button
.
dataset
.
indexText
=
settings
.
navigation
.
user
.
charAt
(
0
);
button
.
dataset
.
iconText
=
settings
.
navigation
.
user
.
substring
(
0
,
2
);
if
(
buttonLabel
)
{
buttonLabel
.
textContent
=
settings
.
navigation
.
user
;
}
});
});
},
};
})(
Drupal
,
drupalSettings
,
once
);
Loading