Conversation
danzhu54
reviewed
Jun 25, 2026
danzhu54
reviewed
Jun 26, 2026
| }); | ||
| } | ||
|
|
||
| function createCookiePreferencesControl() { |
Collaborator
There was a problem hiding this comment.
We don't need to create this from scratch, it should use the API provided in the wcpconsent script
Encapsulate site.js in an IIFE so internal helpers (siteConsent, setCookieManagementVisibility, initializeCookieConsent, scrollIntoMainContent, observer) no longer leak onto window and risk name collisions. openCookiePreferences is still explicitly exported via window.openCookiePreferences since it is invoked from the footer "Manage cookies" link. Also adds "use strict".
danzhu54
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several significant improvements to the site's layout, accessibility, cookie consent management, and code organization. The most notable updates are the addition of a Microsoft-compliant footer, integration of a cookie consent banner and management, migration of inline JavaScript to a dedicated file, and various CSS refactorings for consistency and maintainability.
Site layout and footer enhancements:
MainLayout.razor, including legal links, privacy choices, and a "Manage cookies" option that appears conditionally. The layout is wrapped in a newpage-shellcontainer to support sticky footer behavior. ([[1]](https://github.com/dotnet/apisof.net/pull/160/files#diff-a75adf43377fd160f139e964bf61af9f9c968ced08800643d935318a4ef97acfR87-R124),[[2]](https://github.com/dotnet/apisof.net/pull/160/files#diff-a75adf43377fd160f139e964bf61af9f9c968ced08800643d935318a4ef97acfR3),[[3]](https://github.com/dotnet/apisof.net/pull/160/files#diff-a75adf43377fd160f139e964bf61af9f9c968ced08800643d935318a4ef97acfL58-R59),[[4]](https://github.com/dotnet/apisof.net/pull/160/files#diff-ca43a2acdcba8c0ea687629dd8a3ea0190f5c61e38a985a7288a025196c18c25R637-R705))Cookie consent and privacy controls:
wcp-consent.jsscript, a cookie banner element, and supporting logic to show/hide the "Manage cookies" link based on consent requirements. Related functionality is implemented in the newsite.jsfile. ([[1]](https://github.com/dotnet/apisof.net/pull/160/files#diff-7758fe1efe1e812cf4550817459c72f89f8c7a94421d9f916a097134822fe9dcR19-R23),[[2]](https://github.com/dotnet/apisof.net/pull/160/files#diff-c5e1c74b492428d82683256def70df171e2959e5522078d7614f020c78bebb5bR1-R79),[[3]](https://github.com/dotnet/apisof.net/pull/160/files#diff-a75adf43377fd160f139e964bf61af9f9c968ced08800643d935318a4ef97acfR87-R124))JavaScript organization and accessibility:
_Host.cshtmlintosite.js, improving maintainability and ensuring accessibility features like "Skip to main content" and popover behaviors remain functional. ([[1]](https://github.com/dotnet/apisof.net/pull/160/files#diff-7758fe1efe1e812cf4550817459c72f89f8c7a94421d9f916a097134822fe9dcL39-R42),[[2]](https://github.com/dotnet/apisof.net/pull/160/files#diff-c5e1c74b492428d82683256def70df171e2959e5522078d7614f020c78bebb5bR1-R79))Styling and CSS refactoring:
site.cssfor consistency, including improved selector formatting, new classes for the footer, and better support for dark mode and responsive layouts. ([[1]](https://github.com/dotnet/apisof.net/pull/160/files#diff-ca43a2acdcba8c0ea687629dd8a3ea0190f5c61e38a985a7288a025196c18c25L3-R3),[[2]](https://github.com/dotnet/apisof.net/pull/160/files#diff-ca43a2acdcba8c0ea687629dd8a3ea0190f5c61e38a985a7288a025196c18c25L70-R71),[[3]](https://github.com/dotnet/apisof.net/pull/160/files#diff-ca43a2acdcba8c0ea687629dd8a3ea0190f5c61e38a985a7288a025196c18c25R637-R705), and related CSS changes)Configuration updates:
appsettings.Development.json. ([src/apisof.net/appsettings.Development.jsonL9-R11](https://github.com/dotnet/apisof.net/pull/160/files#diff-723d71275eca9efca9ee20ca88e68312bfd658fb902e98e026508603f3ece7a0L9-R11))