Coder Social home page Coder Social logo

bcgov / bcbb Goto Github PK

View Code? Open in Web Editor NEW
2.0 8.0 0.0 107 KB

A collection of modules for the Drupal base build used to streamline the build and deployment of applications at Ministry of Finance.

License: GNU General Public License v2.0

PHP 65.75% Twig 10.15% CSS 3.84% JavaScript 20.25%
finance drupal cms fin

bcbb's Introduction

bcbb

Lifecycle:Experimental

A collection of modules for the Drupal base-build used to streamline the build and deployment of applications at Ministry of Finance.

bcbb's People

Contributors

chrislaick avatar craigclark avatar gurjinder12 avatar joel-osc avatar lkmorlan avatar nicoledegreef avatar repo-mountie[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bcbb's Issues

add bb_search module

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4614188523


Most of the work for this task is being done as part of the data catalogue search feature.

This task is to confirm that the work done on the data catalogue makes it's way to the base build.

Dev workflow

  • I have written functional tests against the UAT test cases
  • I have run the functional tests and they pass
  • I have written integration tests on areas that may be affected by this feature
  • I have written integration tests under conditions which the feature should not work
  • I have run the Integration tests and they pass
  • I have added a comment to this issue with steps the reviewer needs to follow when doing QA
  • I have verified that the feature is ready for QA in the development environment.

Definition of done (DoD)

  • All search module features done in the data catalog search feature are part of the base-build.

Automated tests are failing due to bootstrap_layouts module

OP timer


Describe the bug

We found an issue with a contributed module that is causing automated tests to fail. The issue was reported to the maintainer

This needs to be discussed at a base-build meeting.

The bootstrap_layouts module is used by page manager to provide the layout we are using for the search result page. This module is convenient because it has multiple BS5 layouts to choose from. You can also add custom classes to regions.

Making custom layouts is not a bug deal, it would get around the issue we have with tests failing. The down side of custom layouts is that they are typically done in code. So the options provided by bootstrap_layouts would not be available to site builders.

That being said, the inability to write automated tests is a serious issue, especially for a feature as important as search.

Task

As a team, figure out if we want to stay with bootstrap_layouts. If now, what do we do instead?

Related:

Content type for Documentation

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4614313836


TBD this is probably a base-build candidate. If so, how do we handle the content type? WxT has a 'book' content type that comes with it. We then use the same settings for project specific content that requires the book features.

User story

As a user of any BD Drupal application, I want to be able to access documentation that will help me understand how the system works for a person with my role so that I can learn how to work with the system to accomplish the tasks it is designed to do.

As a manager of an application, I want to create sets of documentation so that users of the system can easily find material relevant to how they work.

This feature support the following requirements

base-build

Additional context

This content type should use the book module. The book should support subway navigation for internal pages and an option to print the content of the entire book. See RSAMS for an example.

A table of contents for sections within a page will be added in #22.

Proposed solution

  • Use the book module for this content type
  • Content field should be the default body with summary
  • Show summary expanded

Estimated level of effort

  • 3 days

Definition of done (DoD)

    • Documentation is an index page with a table of contents of child pages at the bottom
    • The table of contents at the bottom of the index page shows a summary if it is available
    • The documentation has forward, home, and backward navigation
    • People with correct permissions can add sub-pages directly from a page in the documentation
    • There is a link to print all pages of the selected documentation
    • The title of the index page appears in the breadcrumb
    • A custom module exists bcbb_book that will enable book and create the content type

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Install VBO

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4589910164


  1. install vbo
  2. use vbo on the content overview page by default
  3. this needs to be site and configured when someone creates a project using the base-build

Dev workflow

  • I have run the functional tests and they pass
  • I have written integration tests on areas that may be affected by this feature
  • I have written integration tests under conditions which the feature should not work
  • I have run the Integration tests and they pass
  • I have verified that the feature is ready for QA in the development environment.

Definition of done (DoD)

  • VBO is installed
  • VBO is used on the content overview page
  • VBO will be active on new projects that use the base-build

Lets use common phrasing

TL;DR 🏎️

Teams are encouraged to favour modern inclusive phrasing both in their communication as well as in any source checked into their repositories. You'll find a table at the end of this text with preferred phrasing to socialize with your team.

Words Matter

We're aligning our development community to favour inclusive phrasing for common technical expressions. There is a table below that outlines the phrases that are being retired along with the preferred alternatives.

During your team scrum, technical meetings, documentation, the code you write, etc. use the inclusive phrasing from the table below. That's it - it really is that easy.

For the curious mind, the Public Service Agency (PSA) has published a guide describing how Words Matter in our daily communication. Its an insightful read and a good reminder to be curious and open minded.

What about the master branch?

The word "master" is not inherently bad or non-inclusive. For example people get a masters degree; become a master of their craft; or master a skill. It's generally when the word "master" is used along side the word "slave" that it becomes non-inclusive.

Some teams choose to use the word main for the default branch of a repo as opposed to the more commonly used master branch. While it's not required or recommended, your team is empowered to do what works for them. If you do rename the master branch consider using main so that we have consistency among the repos within our organization.

Preferred Phrasing

Non-Inclusive Inclusive
Whitelist => Allowlist
Blacklist => Denylist
Master / Slave => Leader / Follower; Primary / Standby; etc
Grandfathered => Legacy status
Sanity check => Quick check; Confidence check; etc
Dummy value => Placeholder value; Sample value; etc

Pro Tip 🤓

This list is not comprehensive. If you're aware of other outdated nomenclature please create an issue (PR preferred) with your suggestion.

Add the extended Environment Indicator module

Some time ago, the existence of an extended env variables module (coloured bar?) was discussed for addition to the BCBB but it was not ticketized. Creating a ticket now as a reminder in case that is something that the devs want to add to the bcbb to benefit future users.

Add Panels patch to enable style settings on a block

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4666686647


This feature support the following requirements

alpha release

Additional context

There is currently no way to add custom classes to blocks on a panels page. I had a discussion with Joel about this and ke provided the following info:

So, if you look at the PATCHES.txt file in panels on other sites you can see the patches that were applied... in this case the patch came from drupalwxt so it is not in our composer.json
Enter drupal/panels patch #2849867 description here
Source: https://www.drupal.org/files/issues/2020-04-30/panels_custom_attributes_in_panels_blocks-2849867-78.patch
might be worth getting Liam to add all patches to panels that DrupalWxT add.

Proposed solution

  1. Apply the patch Joel mentioned.
  2. Check panels patches used on WxT and add those as well.

Definition of done (DoD)

  • Attributes can be added to a block on a panel page, see screenshot example

panel block style settings screen capture

Toggle `details` elements

OP timer

https://openplus.monday.com/boards/4092908516/pulses/6021661632


There is a feature we are using on the data dictionary in the data catalogue that expands and collapses a bunch of <details> elements.

Right now it is specific.

this should be made generic and be put into the base-build.

the idea is that an author would add a class, say details-toggle to a wrapper around a bunch of details elements and it just works.

The JS needed for this is already written https://github.com/bcgov/MFIN-Data-Catalogue/blob/1.0.x/html/themes/custom/dc_theme/js/mr.js

After this is done, do bcgov/MFIN-Data-Catalogue#356

Search module addition to base build

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4806164629


This feature support the following requirements

To be characterized at the base-build meeting

Additional context

Depends on #14

Proposed solution

Create a custom module named bcbb_search that:

  • installs search_api
  • installs facets
  • creates search_index display mode
  • add title and body to search_index display
  • creates the search results view site_search
  • create search page at /search/site
  • configure search_api to:
    • use Drupal's DB for search index
    • search content / basic page
    • bundle data source is basic page
    • in search fields, rendered item uses search_index display mode
    • full text search
    • don't include rendered item for view mode > basic page
    • for content, add created, uid, uid:entity:name, changed, type, body, status, title
    • for facets, make sure the content type facet is available on search/site
    • csv download should be available, but disabled by default

Estimated level of effort

  • 3 days

Definition of done (DoD)

  • bcbb_search is enabled by default when a new site is created
  • search results appear at search/site
  • there is a block with a facet for content type on the right of the results page

Note: Important! once this works in base-build we need to make sure data catalogue is using it with data catalogue specific config done locally on that project.

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Changes to theme for book module

Timer

https://openplus.monday.com/boards/4092908516/pulses/4994902277

Layout

Please see screenshot.

If a template isn't practical for the links, we need

<a href="/node/add/book?parent=38">Add child page</a>

to be

<a class="btn btn-light" href="/node/add/book?parent=38"><i class="fa-solid fa-print"></i> Add child page</a>

and

<a href="/node/add/book?parent=38">Add child page</a>

should be

<a class="btn btn-success"> href="/node/add/book?parent=38">Add child page <i class="fa-solid fa-plus"></i></a>

image

Sidebar

Remove sidebar from home page of a book, these links are available at the bottom of the page.

Image

Add missing topics

TL;DR

Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).

Why Topic

In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means it's critical that we work to make our content as discoverable as possible. Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.

What to do

Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic.

add a topic

That's it, you're done!!!

How to use

Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.

Pro Tip 🤓

  • If your org is not in the list below, or the table contains errors, please create an issue here.

  • While you're doing this, add additional topics that would help someone searching for "something". These can be the language used javascript or R; something like opendata or data for data only repos; or any other key words that are useful.

  • Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.

  • If your application is live, add the production URL.

Ministry Short Codes

Short Code Organization Name
AEST Advanced Education, Skills & Training
AGRI Agriculture
ALC Agriculture Land Commission
AG Attorney General
MCF Children & Family Development
CITZ Citizens' Services
DBC Destination BC
EMBC Emergency Management BC
EAO Environmental Assessment Office
EDUC Education
EMPR Energy, Mines & Petroleum Resources
ENV Environment & Climate Change Strategy
FIN Finance
FLNR Forests, Lands, Natural Resource Operations & Rural Development
HLTH Health
IRR Indigenous Relations & Reconciliation
JEDC Jobs, Economic Development & Competitiveness
LBR Labour Policy & Legislation
LDB BC Liquor Distribution Branch
MMHA Mental Health & Addictions
MAH Municipal Affairs & Housing
BCPC Pension Corporation
PSA Public Service Agency
PSSG Public Safety and Solicitor General
SDPR Social Development & Poverty Reduction
TCA Tourism, Arts & Culture
TRAN Transportation & Infrastructure

NOTE See an error or omission? Please create an issue here to get it remedied.

VBO replaces Drupal node actions on content overview page

Note: placeholder, pending discussion of value of vbo by default for content overview page

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4823722071


This feature support the following requirements

Additional context

Proposed solution

Estimated level of effort

  • 1 day
  • 2 days
  • 3 days
  • 4 days
  • 5 days

Definition of done (DoD)

  • criteria 1
  • criteria 2
  • criteria 3

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Automated site tests

  • I have written site tests for this feature
  • I have run the site tests and they pass

This feature requires manual testing

  1. first test step …
  2. second test step …
  3. etc …

Add icon-related mixin

OP timer


This feature support the following requirements

Allow the use of CSS classes icon-type, icon-before, and icon-after.

Additional context

Proposed solution

Estimated level of effort

  • 1 day
  • 2 days
  • 3 days
  • 4 days
  • 5 days

Definition of done (DoD)

  • criteria 1
  • criteria 2
  • criteria 3

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Automated site tests

  • I have written site tests for this feature
  • I have run the site tests and they pass

This feature requires manual testing

  1. first test step …
  2. second test step …
  3. etc …

BC theme by default

OP timer


This feature support the following requirements

base-build

Additional context

Since Drupal is moving away from profiles, this cannot be enabled by default.

We need to make sure the theme looks correct no matter what settings are applied.

Proposed solution

Try the various theme settings for the BB. Make sure they all look decent. Once that is done, for future projects, enable the theme and configure as needed.

Estimated level of effort

  • 2 days

Definition of done (DoD)

  • theme can be enabled on a clean install
  • changing theme settings does not break the theme

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Configure aliases so old ones are kept if the path changes

OP timer


This feature support the following requirements

base-build

Proposed solution

at /admin/config/search/path/settings, select setting to keep existing alias when a path changes.

Estimated level of effort

  • less than 1 day

Definition of done (DoD)

  • Create a new alias. Leave the existing alias functioning. is set at /admin/config/search/path/settings

Testing

Create custom layout mode

OP timer


This feature support the following requirements

alpha release

Additional context

In early stages of development we were using bootstrap_layouts module for the layout of the search page. Something in the module was causing automated tests to fail. After a day and a half or so of investigation, it was determined that the most efficient approach would be to add a custom layout module.

Proposed solution

Create custom layouts that can be used by the base-build.

Dev workflow

  • I have written functional tests against the UAT test cases
  • I have run the functional tests and they pass
  • I have written integration tests on areas that may be affected by this feature
  • I have written integration tests under conditions which the feature should not work
  • I have run the Integration tests and they pass
  • I have added a comment to this issue with steps the reviewer needs to follow when doing QA
  • I have verified that the feature is ready for QA in the development environment.

Definition of done (DoD)

  • New layout mode is available in panal page layouts
  • When the layout is selected, the page displays as inended.
  • There is a stacked column layout (layout with top, left, right, bottom) sections

Remove login and password recovery tabs for MFIN staff

OP timer

https://openplus.monday.com/boards/4092908516/pulses/5007668210


Related base-build theme issue

Users logging in with IDIR

Most people will be authenticating on the site using their IDIR accounts. Currently, there are tabs at /user/login for login and resetting passwords. These options are not useful to people logging in with IDIR and should be removed. If people need to reset passwords, they change their Microsoft credentials, not Drupal. The change password option is misleading.

The page is called Login, the tab is called Login and the CTA on the link is titled Login. The tab is redundant and should be removed.

image

Drupal users

Administrators will continue to login using Drupal accounts at /user/login?showcore. For these users, the tabs should remain as they are.

NOTE: If it proves difficult to manage tabs on the same URL, not showing the tabs takes priority over showing them. Admins have other ways to recover passwords if needed.

DoD

  • at /user/login, I see no login or password tab
  • at /user/login?showcore I see typical Drupal login tabs

Add search bar to header

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4967667339


This feature support the following requirements

alpha release

Additional context

This change should be available in the base-build but needs to be implemented on the data catalogue.

If needed, the base-build theme is here https://github.com/bcgov/bcbb-theme

Proposed solution

Remove user menu currently in header

image

add search block to header

header with search

Note: The search block should not appear in the header on the search page (/search/site)

Estimated level of effort

  • 1 day
  • 2 days
  • 3 days
  • 4 days
  • 5 days

Definition of done (DoD)

  • User can search for content from any page on the site by using a search bar in the header
  • [ ]The search block does not appear in the header on search page

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

TOC for documentation

OP timer

https://openplus.monday.com/boards/4092908516/pulses/4950485273


This feature support the following requirements

alpha release

Additional context

This is for use on #18

Proposed solution

Estimated level of effort

  • 1 day

Definition of done (DoD)

  • In CKEditor, adding [toc] will create a table of contents of that page using its headings
  • This feature is included in bcbb_book module.

Testing

Automated functional tests

  • I have written functional tests for this feature
  • I have run the functional tests and they pass

Analytics Options Assessment and Inclusion in Base Build

OP timer


This feature support the following requirements

As a business owner of a Drupal-based application
I need to have access to basic site analytics
so that I can assess the use of the site on demand.

Additional context

Application owners are looking for:

  • traffic reports (visitors, unique visitors?)
  • what pages people are visiting
  • how long they’re on the pages
  • what the entry and exit spots are for a session
  • what pathways people take through the site
  • what times and days the pages are being viewed
  • what media library assets are being opened
  • any other “industry standard” information available in analytics tools. The more granular we can get the better.

Proposed solution

Analysis of options, ideally native to Drupal, that can support these types of analytics. Timeline for advice and discussion: mid-August 2023

Definition of done (DoD)

  • options communicated to the base build project team
  • discussion of the options
  • possible inclusion of selection in the base build (OpenPlus)
  • possible adoption of selection in the FINtranet app (MFIN-IMB)

Testing

Add project lifecycle badge

No Project Lifecycle Badge found in your readme!

Hello! I scanned your readme and could not find a project lifecycle badge. A project lifecycle badge will provide contributors to your project as well as other stakeholders (platform services, executive) insight into the lifecycle of your repository.

What is a Project Lifecycle Badge?

It is a simple image that neatly describes your project's stage in its lifecycle. More information can be found in the project lifecycle badges documentation.

What do I need to do?

I suggest you make a PR into your README.md and add a project lifecycle badge near the top where it is easy for your users to pick it up :). Once it is merged feel free to close this issue. I will not open up a new one :)

Write documentation for search module

OP timer


User story

As a product manager at MFIN, I want to be able to understand the deployment of a search feature to any Drupal project so that users can be confident they have accurate results and overhead is minimal for the development team.

This feature support the following requirements

base-build

Additional context

Document configuration, with screenshots. Cover the following

  • search api config
  • indexing
  • search view mode
  • facets

Definition of done (DoD)

  • Developer with no knowledge of the system can follow the instructions and get search working

Note: All documentation in the wiki are considered living documents and will be changed as needed after this task has been completed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.