Commit graph

127 commits

Author SHA1 Message Date
mgechev
a27da867f9 docs: remove state of js 2023 banner (#53798)
PR Close #53798
2024-01-04 13:56:20 -08:00
mgechev
63fd649358 docs: add state of js survey link (#53537)
PR Close #53537
2023-12-12 14:32:12 -08:00
Emma Twersky
8bbec83dfd docs: add angular.dev banner (#52535)
PR Close #52535
2023-11-06 11:04:10 -08:00
Emma Twersky
868a548996 docs: make banner persist until 11/8 (#52432)
PR Close #52432
2023-10-31 11:57:06 -07:00
Emma Twersky
5b7b541ce9 docs: add event banner (#52334)
PR Close #52334
2023-10-23 13:39:58 -07:00
mgechev
4dffbeff35 docs: remove the developer survey 2023 banner (#52116)
PR Close #52116
2023-10-10 11:23:44 -07:00
Aristeidis Bampakos
fa29eb84a3 docs: fix casing of a11y labels in main page (#51431)
PR Close #51431
2023-08-29 23:30:11 +00:00
mgechev
803fc7f0f7 docs: add link to developer survey 2023 (#51444)
PR Close #51444
2023-08-21 13:43:49 -07:00
aanchal
f285a228db docs: update the html tags (#50808)
PR Close #50808
2023-06-22 09:44:50 -07:00
Matthieu Riegler
ed8a595408 docs: Improve previous version navigation (#49063)
In archive mode the link to the current doc will now point to same page.
If the page doesn't exist anymore, it will show a contextualized warning message.

See #46850

PR Close #49063
2023-04-06 11:07:00 -07:00
mgechev
0c7b9aab34 docs: close the developer survey (#49092)
PR Close #49092
2023-02-16 15:32:45 -08:00
mgechev
f09b6e4507 docs: add angular devsat q1 2023 (#48683)
PR Close #48683
2023-01-11 14:58:35 -08:00
mgechev
2d539e14eb docs: hide state of js survey (#48578)
PR Close #48578
2023-01-02 12:19:50 +00:00
Pawel Kozlowski
6706fab017 perf(docs-infra): remove usage of the NgClass directive (#48312)
NgClass has non-negligable performance cost, especially if a
different object is provided as NgClass input (which was the case
for the NavItemComponent). The perfornace problem was noticed
in the scope of the INP score investigations while profiling the
https://angular.io/resources page. On this particular page replacing
NgClass usage with alternatives results in 20x (!) runtime perf
improvement. Such big improvement is possible since we avoid unneeded
CSS classes removal / adding in the DOM.

Part of #25518

PR Close #48312
2022-12-02 08:58:19 -08:00
mgechev
c5d176ceb5 docs: add state of javascript banner (#48160)
PR Close #48160
2022-11-22 09:45:42 -08:00
mgechev
d8f1f63860 docs: temporarily hide banner to improve survey visibility (#47564)
PR Close #47564
2022-09-29 10:49:35 -07:00
George Kalpakas
876ba77bcd refactor(docs-infra): fix TypeScript warnings due to property types (#47201)
Fix some TypeScript build warnings related to things like redundant `?.`
and `??` operators and uninitialized/non-nullable `@Input` properties.

You can see an example build with the warnings [on CI][1].

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-232

PR Close #47201
2022-08-22 10:51:02 -07:00
dario-piotrowicz
557cf7dc63 fix(docs-infra): convert docs select for versions into navigation (#46674)
convert the select for the docs versions into a proper navigation to
make it more clear for users and also to improve its accessibility

resolves #44339

PR Close #46674
2022-07-15 22:56:39 +00:00
dario-piotrowicz
974da3f802 fix(docs-infra): improve accessibility of aio-select component (#46013)
improve the accessibility of the aio-select component so that it is
clear for screen reader users its functionality (currently it is
presented as a simple button), following the WAI-ARIA authoring
practices (see: https://www.w3.org/TR/wai-aria-practices/#combobox)

A first attempt in improving the accessibility of the component has been
tried in PR #45937 by replacing it with the material select component,
such implementation has however been scrapped since the increase of
payload sizes has proven prohibitively large

(also note that given native select elements haven't been used given the lack
of syling options for such elements)

PR Close #46013
2022-06-10 16:10:35 +00:00
dario-piotrowicz
d2436bfc91 feat(docs-infra): add close button to search-results aio panel (#45579)
add a close button to the search-results aio panel so that the user can
conveniently close it via keyboard

this complements the focus trap implemented in PR #44989
(more here: https://github.com/angular/angular/pull/44989#issuecomment-1037287678)

PR Close #45579
2022-04-15 14:22:13 -07:00
dario-piotrowicz
7d9492353d fix(docs-infra): implement focus trap for aio search results (#44989)
currently if a user tries to navigate via keyboard, once the are
presented with search results, the search results panel remains
present and can potentially hide most of the content on the page,
in such case keyboard navigation will be severly hindered and
the only option for the user would be to go back to the seach input
text and clear its value, fix such inconvenience by looping the
focus in the header area close to the search results and the
results panel itself

note: an alternative implementation using the cdkTrapFocus has been
attempted in PR #45194, such alternative implementation presented a
number of (minor) drawbacks (including the increase main bundle size
due to the inclusion of the A11yModule), so it was agreed to proceed
with the manual implementation present in these changes instead.

PR Close #44989
2022-03-29 16:56:03 -07:00
zverbeta
099fedc9b3 docs: add notification to support ukraine (#45376)
PR Close #45376
2022-03-29 15:25:49 -07:00
dario-piotrowicz
0fc4571b85 fix(docs-infra): assign different aria labels to main aio navs (#45209)
assign different aria labels to the primary nav and the one used for
guides and docs, so that impaired users can more easily distinguish the
two

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
734bd8d953 fix(docs-infra): remove redundant main roles (#45209)
remove redundant main role as pages should always have a
single element with a main role (also remove the role assigne
to the main tag as that is implied)

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
be5dce2cdd fix(docs-infra): wrap the main aio mat-toolbar in a header (#45209)
wrap the main aio mat-toolbar in a header element to provide better
accessibility

resolves #16938 (the first point)

PR Close #45209
2022-03-29 09:23:12 -07:00
mgechev
39b90b46b6 docs: remove banner after survey expiration (#44949)
The survey is now over. We can remove the banner.

PR Close #44949
2022-02-02 19:50:20 +00:00
mgechev
1b56437376 docs: update the survey expiration date (#44938)
Extend with a few more days since the survey is still open.

PR Close #44938
2022-02-02 01:56:40 +00:00
Andrew Kushnir
c12110f2f8 docs: update survey id (#44865)
The survey id is used as a key in the local storage to keep the state (don't show the message again). Reusing this survey id will make the message invisible to some users who already have that key in local storage.

PR Close #44865
2022-01-27 21:52:35 +00:00
mgechev
1312ac1d98 docs: enable the survey banner (#44861)
PR Close #44861
2022-01-27 11:43:54 -08:00
George Kalpakas
ef140a76d9 fix(docs-infra): fix the main content layout (#44282)
Fix the layout of the main docs content on both small and large screens.
On small screens, content could overlap with the floating ToC, while on
large screens the content was not centered correctly (see screenshots
below).

(For reference, this was accidentally broken in #44236.)

**Before:**
- ![content on small screen before](https://user-images.githubusercontent.com/8604205/143491577-97255ee7-f79d-4c95-9287-ff2afeb5b29d.png)
- ![content on large screen before](https://user-images.githubusercontent.com/8604205/143491582-2c19f7a2-d5ad-475a-a58b-e449efc492a9.png)

**After:**
- ![content on small screen after](https://user-images.githubusercontent.com/8604205/143491580-a405f650-cd4a-4804-8e65-422fc91f4c6e.png)
- ![content on large screen after](https://user-images.githubusercontent.com/8604205/143491585-d0d2e914-a1a2-45ba-8e6b-b9546aa80354.png)

PR Close #44282
2021-11-29 17:21:14 -05:00
dario-piotrowicz
2bf131a8a0 fix(docs-infra): move aio footer inside mat-sidenav-container (#44236)
currently the aio footer sits outside the mat-sidenav-container, as a
result when the mat-sidenav in over mode appears, the footer is not
placed under the sidenav backdrop, move the footer inside the
mat-sidenav-container so that it does

PR Close #44236
2021-11-24 17:04:01 +00:00
mgechev
02b84af5bd docs: update the survey expiry date (#44021)
PR Close #44021
2021-11-04 18:55:24 +00:00
George Kalpakas
df5f737081 fix(docs-infra): improve accessibility by respecting prefers-reduced-motion (#43977)
Make the app easier to use for people with motion sensitivities by
disabling several animations (esp. ones involving moving things around)
when the user prefers reduced motion. The user's preference is detected
using the [prefers-reduced-motion][1] CSS media feature.

Disabled animations include:
- View fade in/out transitions.
- Sidenav open/close animations.
- Top-menu color and size changes.
- Contributor cards flip animations.

For more details on using `prefers-reduced-motion` and disabling
Angular animations see:
- [Designing with reduced motion for motion sensitivities][2]
- [Disabling Angular animations at runtime][3]

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
[2]: https://www.smashingmagazine.com/2020/09/design-reduced-motion-sensitivities/
[3]: https://dev.to/this-is-angular/disabling-angular-animations-at-runtime-9a6

PR Close #43977
2021-10-29 15:44:58 -07:00
mgechev
b64f796cc7 docs: add developer survey 2021 (#43670)
PR Close #43670
2021-10-04 10:24:58 -07:00
George Kalpakas
d1baf7cdfb fix(docs-infra): add a "skip to content" link for better accessibility (#43460)
Add a link at the top of the page that allows skipping directly to the
main content area. This allows people using assistive technologies to
skip navigation-related parts of the page which are presented before the
main content.

Related resources:
- [www.w3.org](https://www.w3.org/TR/WCAG20-TECHS/G1.html)
- [accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content)
- [css-tricks.com](https://css-tricks.com/how-to-create-a-skip-to-content-link)

---
Example implementations on other websites:

- **[accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/)**:
  ![accessibility.oit.ncsu.edu](https://user-images.githubusercontent.com/8604205/133285834-db1314e6-ff71-4862-8f80-c8a9f69083d9.png)

- **[smile.amazon.com](https://smile.amazon.com/)**:
  ![smile.amazon.com](https://user-images.githubusercontent.com/8604205/133285854-1163e733-8de3-4244-bc23-5cd5a943001d.png)

- **[chase.com](https://chase.com/)**:
  ![chase.com](https://user-images.githubusercontent.com/8604205/133293396-ade9d95f-56ce-4cdc-8926-b4cd2dc6c3a5.png)

- **[css-tricks.com](https://css-tricks.com/)**:
  ![css-tricks.com](https://user-images.githubusercontent.com/8604205/133285845-702045ee-088a-40f1-bb26-21adebb02505.png)

- **[github.com/angular/angular](https://github.com/angular/angular)**:
  ![github.com/angular/angular](https://user-images.githubusercontent.com/8604205/133921259-9fd759b9-f862-47c3-b069-643912df17a1.png)

- **[news.sky.com](https://news.sky.com/)**:
  ![news.sky.com](https://user-images.githubusercontent.com/8604205/133285863-89946096-5353-4b2b-ab69-eb748bdcfe06.png)

- **[youtube.com](https://youtube.com/)**:
  ![youtube.com](https://user-images.githubusercontent.com/8604205/133921261-a68a12c1-1aea-4ad0-8457-b4eaf8ed3497.png)

---
Angular.io implementation:

- **[angular.io](https://angular.io/)**:
  ![angular.io](https://user-images.githubusercontent.com/8604205/133409634-0054625c-d14b-4ebe-bb4c-142cfc524d98.png)

Fixes #42936

PR Close #43460
2021-09-21 16:12:39 +00:00
George Kalpakas
95ba5b4edb fix(docs-infra): ensure the sidenav backdrop covers the floating ToC (#42787)
Previously, on narrow pages where the sidenav was in `over` mode, the
sidenav's backdrop only covered the main docs content but not the
floating Table of Contents (ToC) on the right. This was inconsistent and
confusing to the user, because they could interact with the ToC and
scroll to different area of the main content while the sidenav and
backdrop were still covering the content.

This commit fixes it by ensuring the sidenav backdrop covers both the
main content and the floating ToC (when present).

Fixes #42778

PR Close #42787
2021-07-07 13:40:00 -07:00
George Kalpakas
19bcdfb028 fix(docs-infra): correctly configure top-menu nav-item in the sidenav (#42747)
Previously, the condition for showing the top-menu nav-menu in the
sidenav was the same as that for switching the sidenav mode from docked
(`mode: side`) to floating (`mode: over`). Therefore, the `isWide` input
of the corresponding `NavMenuComponent` could be hard-coded to `false`
(since the component would only be shown when the sidenav was in
floating mode).

In 61f6ed2fdf, these two desicions were
decoupled, which would result in the top-menu nav-item being shown in
the sidenav while the sidenav is in docked mode (and thus the `isWide`
input should be set to `true`).

This commit fixes it by setting the `isWide` input based on the value of
the `dockSideNav` property, as happens for the rest of the nav-menus.

PR Close #42747
2021-07-02 09:23:05 -07:00
George Kalpakas
29302e3baa fix(docs-infra): remove redundant MatIcon element (#42584)
Previously, we included a dummy `MatIcon` element in `AppComponent` in
order to ensure that the `Material Icons` font would be requested (and
thus cached by the ServiceWorker) on every navigation. However, #41129
introduced the `ThemeToggleComponent`, which will be present on all
pages (since it is located in the top-menu) and relies on the
`Material Icons` font. Therefore, the work-around for loading the
`Material Icons` font is no longer necessary.

This commit removes the now redundant `MatIcon` from `AppComponent`.

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas
fd8f9ab4e8 fix(docs-infra): convert external links to MatIconButtons (#42584)
This commit changes the anchor elements used for external links to
`MatIconButton`s. While the appearance remains the same (with the
exception of hover/focus styles), this better aligns the styling of
external link icons with other nearby icon buttons (i.e. the theme
toggle) and alows as to simplify the CSS for external links (since much
of their styling is handled by Angular Material).

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas
828fde6e0d feat(docs-infra): implement popup to inform about the use of cookies (#42259)
This commit adds a popup to angular.io to inform the user about the use
of cookies. Once the user confirms having read the info, the popup will
not be shown on subsequent visits.

This commit is partly based on angular/material.angular.io#988.

Fixes #42209

PR Close #42259
2021-06-14 09:54:08 -07:00
AleksanderBodurri
cdb8f556fb feat(docs-infra): implement dark mode (#41129)
defines styles for a first iteration of an aio darkmode

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri
85a627f741 feat(docs-infra): port over material io theming logic to angular io (#41129)
brings in theming tools from material io into angular io in preparation of implementing darkmode

PR Close #41129
2021-05-27 11:24:52 -07:00
twerske
be8893fd1d docs: add youtube to social icons (#40987)
PR Close #40987
2021-02-26 15:50:36 -08:00
George Kalpakas
fc7e77934f refactor(docs-infra): decouple showing the top-menu in top-bar from showing the sidenav (#37938)
As part of angular.io's responsive layout, the following rules are
applied:
- On wide screens, a menu is shown in the top-bar and the sidenav is
  shown side-by-side with the docs content.
- On narrow screens, the top-menu is moved from the top-bar to the
  sidenav and the sidenav is closed by default and floats over the
  content when manually opened.

Previously, the break-points at which the top-menu was shown in the
top-bar and the sidenav was shown side-by-side with the content were the
same (using a single variable).

This commit decouples the two break-points to make it possible to use
different values in the future.

PR Close #37938
2020-07-06 13:57:37 -07:00
Stephen Fluin
ec8bae1b27 docs: update end date of survey to middle of April (#36339)
PR Close #36339
2020-04-01 11:10:58 -07:00
Stephen Fluin
0d806c84e2 docs: add developer survey 2020 (#35655)
PR Close #35655
2020-03-11 16:10:47 -07:00
George Kalpakas
2aa940f55c fix(docs-infra): highlight the currently active node in top-bar (#33351)
Related to #33239 and #33255.

PR Close #33351
2020-02-20 10:52:54 -08:00
George Kalpakas
4e1f37fc17 refactor(docs-infra): replace mousewheel event with wheel event (#32980)
This commit replaces the non-standard, depecated [mousewheel][1] event
(which is not supported in Firefox and possibly other browsers too) with
the standard [wheel][2] event, which works on all supported browsers
according to [MDN's compatibility table][3].

I manually tested it in Chrome, Firefox, Edge and IE11.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
[3]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event#Browser_compatibility

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas
04ae1251c7 fix(docs-infra): prevent extra space at the bottom of the page in Chrome (#28864)
The supposedly visually hidden `mat-icon` creates unnecessary space at
the bottom of the page (below the footer) in recent Chrome versions.
This didn't happen before and it still doesn't happen in other browsers
(Firefox, Edge, IE).

This commit fixes it by wrapping the icon in a visually hidden `div`
container, which doesn't have other styles (such as `mat-icon` does)
that could affect the layout of the page.

Fixes #28858

PR Close #28864
2019-02-20 09:20:37 -08:00
Stephen Fluin
ed032e08c1 feat(aio): show developer survey 2019 (#28552)
PR Close #28552
2019-02-06 02:33:39 -05:00