Skip to content

Commit

Permalink
🦋 updates ActiveDocs empty state and alerts (#3504)
Browse files Browse the repository at this point in the history
🦋 updates ActiveDocs empty state and alerts
  • Loading branch information
josemigallas authored Aug 9, 2023
1 parent c016a9e commit 6b835bd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 35 deletions.
19 changes: 0 additions & 19 deletions app/assets/stylesheets/provider/_swagger_upgrade_box.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/stylesheets/provider/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
@import 'provider/create_application';
@import 'provider/logo';
@import 'provider/info_box';
@import 'provider/swagger_upgrade_box';
@import 'provider/call_to_action';

// view specific stylesheets placed in the controller paths
Expand Down
1 change: 1 addition & 0 deletions app/javascript/packs/provider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@import '~@patternfly/patternfly/layouts/Grid/grid.css';

// Patternfly components - Add everything not covered by React.
@import '~@patternfly/patternfly/components/Alert/alert.css';
@import '~@patternfly/patternfly/components/Card/card.css';
@import '~@patternfly/patternfly/components/Content/content.css';
@import '~@patternfly/patternfly/components/DataList/data-list.css';
Expand Down
30 changes: 16 additions & 14 deletions app/views/admin/api_docs/base/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
- content_for :page_header_title, 'ActiveDocs'

- if @api_docs_services.any? { |service| service.needs_swagger_update? }
= link_to t("api.integrations.proxy.documentation_create_active_doc_spec", docs_base_url: docs_base_url), class: 'SwaggerUpgradeBox' do
p.SwaggerUpgradeBox-message
span.SwaggerUpgradeBox-logo
| ActiveDocs now supports Swagger 2.0. Read here why it makes sense to upgrade your service specs to Swagger 2.0

- if @api_docs_services.any?
= render partial: 'active_docs_table', locals: {service: @service, api_docs_services: @api_docs_services}
- else
- if current_account.api_docs_services.without_service.any? && can?(:manage, :portal)
.InfoBox.InfoBox--notice
p
' You have
=> link_to '1 or more ActiveDocs', admin_api_docs_services_path
' that are not attached to any API. You can attach them to this (or any other) API in their respective
em> edit
| views.
- content_for :page_header_alert do
br
div class="pf-c-alert pf-m-info pf-m-inline" aria-label="Info alert"
div class="pf-c-alert__icon"
i class="fas fa-fw fa-info-circle" aria-hidden="true"
p class="pf-c-alert__title"
span class="pf-screen-reader" Info alert:
| There are unattached ActiveDocs
div class="pf-c-alert__description"
p
' You have
=> link_to '1 or more ActiveDocs', admin_api_docs_services_path
' that are not attached to any API. You can attach them to this (or any other) API in their respective
em> edit
| views.

div class="pf-c-empty-state pf-m-lg"
div class="pf-c-empty-state__content"
i class="fas fa-plus-circle pf-c-empty-state__icon" aria-hidden="true"
h1 class="pf-c-title pf-m-lg" You have no specs
h1 class="pf-c-title pf-m-lg" No ActiveDocs specs yet
div class="pf-c-empty-state__body"
| Make your API documentation clear, intuitive, and user friendly with 3scale ActiveDocs.
= link_to('Create your first spec', new_api_docs_service_path(@service), class: 'pf-c-button pf-m-primary')
Expand Down
2 changes: 2 additions & 0 deletions app/views/shared/provider/_page_header.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
h1 = title
- if (subtitle = content_for(:page_header_body).presence)
p = subtitle
- if (alert = content_for(:page_header_alert).presence)
= alert

/ TODO: this will go away once we move all buttons from page hader to a toolbar
- elsif (title = content_for(:page_header_title_with_button).presence)
Expand Down
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ en:
documentation_self_managed_url: '%{docs_base_url}/deployment-options/apicast-self-managed-nginx-config-files'
documentation_oauth_url: '%{docs_base_url}/deployment-options/apicast-oauth-before-may-2017'
documentation_response_codes_tracking_url: '%{docs_base_url}/admin_portal_guide/setting-up-and-evaluating-the-threescale-response-codes-log-for-your-api_analytics-for-threescale-apis'
documentation_create_active_doc_spec: "%{docs_base_url}/providing_apis_in_the_developer_portal/create-activedocs-spec"
# end documentation links
proxy_rule_catch_all_warning: |
"Catch all" Mapping Rules often lead to double counts when more specific rules are added.
Expand Down

0 comments on commit 6b835bd

Please sign in to comment.