Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIKE][DSS-29] ongoing feedback display #1686

Draft
wants to merge 23 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
eef2795
feat(support): help and feedback drawer content additions
teenwolfblitzer Feb 6, 2023
c7fa8e8
feat(search): clean up search form
teenwolfblitzer Feb 6, 2023
22a0e3d
feat(sidebar): replace sidebar nav link with button
teenwolfblitzer Feb 7, 2023
db51b6d
feat(support): modify footer links and structure
teenwolfblitzer Feb 7, 2023
8d703a0
feat(search): extend rails search, remove invalid attr
teenwolfblitzer Feb 7, 2023
232cb79
feat(search): formatting fixes
teenwolfblitzer Feb 7, 2023
30e24dd
feat(support): relocate feedback to footer
teenwolfblitzer Feb 9, 2023
4a0c9cf
feat(support): sample storybook links
teenwolfblitzer Feb 9, 2023
de72dfa
docs(support): revised layout
teenwolfblitzer Mar 1, 2023
741c7f9
docs(support): revised storybook layout, text adjustments
teenwolfblitzer Mar 1, 2023
2c020ca
docs(feedback): add spacing to form
teenwolfblitzer Mar 2, 2023
d17d49b
refactor(search): add partial
teenwolfblitzer Mar 2, 2023
fedc6c9
docs(feedback): replace emojicom
teenwolfblitzer Apr 10, 2023
9ca6522
docs(feedback): updated drawer components
teenwolfblitzer Apr 11, 2023
8aa9cfe
fix(docs search): add form button type
teenwolfblitzer Apr 11, 2023
00d2141
docs(support): revised language in storybook
teenwolfblitzer Apr 11, 2023
01252b9
docs(support): rearrange support content
teenwolfblitzer Apr 11, 2023
db3c583
docs(sidebar): deprecation status in sidebar
teenwolfblitzer Jun 8, 2023
4019dd5
docs(sidebar): page category icons
teenwolfblitzer Jun 8, 2023
3c218a3
docs(support): update layouts for modal display
teenwolfblitzer Jun 8, 2023
ff69b99
docs(nav): display active page, correct nav icons
teenwolfblitzer Jun 9, 2023
6a07c9a
fix(nav): search page nav route
teenwolfblitzer Jun 9, 2023
ececedf
fix(footer): link and icon adjustments
teenwolfblitzer Jun 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/app/helpers/components_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def sage_components
responsive: "todo",
a11y: "done",
figma_embed: "",
deprecated: true
},
{
title: "chart_legend",
Expand Down
6 changes: 6 additions & 0 deletions docs/app/helpers/nav_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module NavHelper
def page_active(page_action, page_controller = "pages")
return if current_page?(controller: 'pages', action: 'index') || current_page?(controller: 'pages', action: 'search')
current_page?(controller: page_controller, action: page_action)
end
end
84 changes: 50 additions & 34 deletions docs/app/views/application/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
<% footerContainer ||= false %>

<div class="docs-footer">
<footer class="docs-footer">
<% if footerContainer %>
<div class="sage-container sage-container--xl">
<% end %>

<%= sage_component SageButtonGroup, { gap: :md } do %>
<%= sage_component SageButton, {
value: "Version #{$SAGE_VERSION_GEM}",
attributes: {
href: $SAGE_RELEASE_URL,
target: "_blank",
rel: "noopener",
title: "Open SageRails gem source"
},
subtle: true,
} %>
<%= sage_component SageButton, {
value: "SASS Docs",
attributes: {
href: Rails.application.config.sassdocs_root_url,
target: "_blank",
rel: "noopener",
title: "Open Sassdocs site"
},
subtle: true,
} %>
<%= sage_component SageButton, {
value: "Storybook",
attributes: {
href: storybook_url(nil),
target: "_blank",
rel: "noopener",
title: "Open Storybook React components site"
},
subtle: true,
} %>
<%= sage_component SageButtonGroup, { gap: :md, align: "space-between" } do %>
<%= sage_component SageButtonGroup, { gap: :md } do %>
<%= sage_component SageButton, {
value: "Was this page helpful?",
subtle: true,
style: "primary",
icon: {
style: "left",
name: "feedback",
},
attributes: {
"data-js-modaltrigger": "support-request",
"data-js-event": "support-request-sidebar"
}
} %>
<%= sage_component SageLink, {
label: "SassDocs",
url: Rails.application.config.sassdocs_root_url,
external: true,
style: "secondary",
remove_underline: true,
icon: {
name: "launch",
style: "right"
},
} %>
<%= sage_component SageLink, {
label: "Storybook",
url: storybook_url(nil),
external: true,
style: "secondary",
remove_underline: true,
icon: {
name: "launch",
style: "right"
},
} %>
<% end %>
<%= sage_component SageButtonGroup, { gap: :md } do %>
<%= sage_component SageLink, {
label: "Sage v.#{$SAGE_VERSION_GEM}",
url: $SAGE_RELEASE_URL,
external: true,
style: "secondary",
small: true,
remove_underline: true,
} %>
<% end %>
<% end %>

<% if footerContainer %>
</div>
<% end %>
</div>
</footer>
37 changes: 17 additions & 20 deletions docs/app/views/application/_nav.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,74 +4,71 @@
value: "Home",
attributes: {
href: "/",
title: "Home"
title: "Home",
"data-nav-active": page_active('index') ? "true" : nil
},
subtle: true,
icon: {
style: "left",
name: "home"
},
css_classes: "docs-nav__item"
} %>
<%= sage_component SageButton, {
value: "Foundations",
attributes: {
href: pages_foundation_path(:design_principles),
title: "Foundations"
title: "Foundations",
"data-nav-active": page_active('foundation') ? "true" : nil
},
subtle: true,
icon: {
style: "left",
name: "form"
name: "customize"
},
css_classes: "docs-nav__item"
} %>
<%= sage_component SageButton, {
value: "Components",
attributes: {
href: pages_component_path(sorted_sage_components.first[:title]),
title: "Components"
title: "Components",
"data-nav-active": page_active('component') ? "true" : nil
},
subtle: true,
icon: {
style: "left",
name: "folder"
name: "product"
},
css_classes: "docs-nav__item"
} %>
<%= sage_component SageButton, {
value: "Layout Tools",
attributes: {
href: pages_layout_path(sage_layouts_sorted.first[:title]),
title: "Layout Tools"
title: "Layout Tools",
"data-nav-active": page_active('layout') ? "true" : nil
},
subtle: true,
icon: {
style: "left",
name: "stack"
},
css_classes: "docs-nav__item"
} %>
<!-- COMING SOON
<%= sage_component SageButton, {
value: "Interactions",
attributes: {
href: pages_interactions_path(:container),
title: "JS Interactions"
},
subtle: true,
icon: {
style: "left",
name: "select"
},
} %>-->
<%= sage_component SageButton, {
value: "Helpers",
attributes: {
href: pages_helpers_path(:spacing),
title: "Style Helpers"
title: "Style Helpers",
"data-nav-active": page_active('helpers') ? "true" : nil
},
subtle: true,
icon: {
style: "left",
name: "code"
},
css_classes: "docs-nav__item"
} %>
<% end %>
</div>
120 changes: 70 additions & 50 deletions docs/app/views/application/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,33 @@
<% if current_page_foundations? %>
<%= sage_component SageNav, {
items: [
{ link: pages_foundation_path(:design_principles), text: "FOUNDATIONS", items: [
{
text: "Design Principles",
link: pages_foundation_path(:design_principles),
active: current_page?(pages_foundation_path(:design_principles)),
},
{
text: "Colors",
link: pages_foundation_path(:color),
active: current_page?(pages_foundation_path(:color)),
},
{
text: "Typography",
link: pages_foundation_path(:typography),
active: current_page?(pages_foundation_path(:typography)),
},
{
text: "Icons",
link: pages_foundation_path(:icon),
active: current_page?(pages_foundation_path(:icon)),
}]
}
]
} %>
{
link: pages_foundation_path(:design_principles),
text: "FOUNDATIONS",
icon: "customize",
items: [
{
text: "Design Principles",
link: pages_foundation_path(:design_principles),
active: current_page?(pages_foundation_path(:design_principles)),
},
{
text: "Colors",
link: pages_foundation_path(:color),
active: current_page?(pages_foundation_path(:color)),
},
{
text: "Typography",
link: pages_foundation_path(:typography),
active: current_page?(pages_foundation_path(:typography)),
},
{
text: "Icons",
link: pages_foundation_path(:icon),
active: current_page?(pages_foundation_path(:icon)),
}]
}
] } %>
<% end %>
<% if current_page_interactions? %>
<%= sage_component SageNav, {
Expand All @@ -43,22 +46,26 @@
<% if current_page_helpers? %>
<%= sage_component SageNav, {
items: [
{ link: pages_helpers_path(:spacing), text: "HELPERS", items: [
{
text: "Spacing",
link: pages_helpers_path(:spacing),
active: current_page?(pages_helpers_path(:spacing)),
},
{
text: "Truncation",
link: pages_helpers_path(:truncation),
active: current_page?(pages_patterns_path(:truncation)),
},
{
text: "Reveal",
link: pages_helpers_path(:reveal),
active: current_page?(pages_patterns_path(:reveal)),
}
{
link: pages_helpers_path(:spacing),
text: "HELPERS",
icon: "code",
items: [
{
text: "Spacing",
link: pages_helpers_path(:spacing),
active: current_page?(pages_helpers_path(:spacing)),
},
{
text: "Truncation",
link: pages_helpers_path(:truncation),
active: current_page?(pages_patterns_path(:truncation)),
},
{
text: "Reveal",
link: pages_helpers_path(:reveal),
active: current_page?(pages_patterns_path(:reveal)),
}
] },
]
} %>
Expand Down Expand Up @@ -96,6 +103,7 @@
items: [{
link: pages_layout_path(sage_layouts_sorted[0][:title]),
text: "LAYOUT TOOLS",
icon: "stack",
items: layout_list
}]
} %>
Expand All @@ -108,26 +116,38 @@
text: component[:title].titleize,
link: pages_component_path(component[:title]),
active: current_page?(pages_component_path(component[:title])),
icon: component[:deprecated] ? "warning" : nil,
attributes: {
"data-deprecated": component[:deprecated] ? "true" : nil
}
}
end
%>
<%= sage_component SageNav, {
items: [
{ link: pages_component_path(sorted_sage_components[0][:title]), text: "COMPONENTS", items: component_list }
{
link: pages_component_path(sorted_sage_components[0][:title]),
text: "COMPONENTS",
items: component_list,
icon: "product"
}
]
} %>
<% end %>

<%= content_for :sage_sidebar_footer do %>
<%= sage_component SageNav, {
aria_label: "Secondary",
items: [
{
text: "Get Support",
link: pages_support_path,
active: current_page?(pages_support_path),
}
]
<%= sage_component SageButton, {
value: "Help & Feedback",
icon: {
style: "left",
name: "help-filled",
},
attributes: {
"data-js-modaltrigger": "support-request",
"data-js-event": "support-request-sidebar"
}
} %>
<% end %>
<% end %>

<%= render "pages/support_modal" %>
2 changes: 1 addition & 1 deletion docs/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= render "application/content_skip_link",
link_id: "main-content"
-%>
<%= sage_component(SageHeader, {}) do %>
<%= sage_component(SageHeader, {css_classes: "sage-docs-header"}) do %>
<%= render "application/assistant" %>
<% end %>
<%= sage_component(SageStage, {}) do %>
Expand Down
6 changes: 6 additions & 0 deletions docs/app/views/layouts/full_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
<%= render "application/footer" %>
<% end %>
<% end %>
<%= render "pages/support_modal" %>
<%= sage_component(SageOverlay, {}) %>
<% if content_for? :sage_docs_modals %>
<div id="sage-docs-modals">
<%= content_for :sage_docs_modals %>
</div>
<% end %>
<% end %>
<%= render "scripts" %>
<% end %>
Expand Down
7 changes: 7 additions & 0 deletions docs/app/views/layouts/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
link_id: "main-content"
-%>
<%= yield %>
<%= render "pages/support_modal" %>
<%= render "application/footer", footerContainer: true %>
<%= sage_component(SageOverlay, {}) %>
<% if content_for? :sage_docs_modals %>
<div id="sage-docs-modals">
<%= content_for :sage_docs_modals %>
</div>
<% end %>
<%= render "scripts" %>
</body>
</html>
Loading