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

[EXPERIMENTAL] use vite #187

Draft
wants to merge 28 commits into
base: m3-main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
49c102d
update structure
KyleMit Jan 21, 2023
9ad2a4c
move static html into source - remove from public
KyleMit Jan 22, 2023
2e2c51e
use dotfiles at root
KyleMit Jan 22, 2023
c2bf2f2
remove static images - served from public
KyleMit Jan 22, 2023
10f107b
remove webpack esbuild configs
KyleMit Jan 22, 2023
ba3cb82
add vite package
KyleMit Jan 22, 2023
3727f9e
add vite config and inject jquery
KyleMit Jan 22, 2023
50ae017
move readme docs to root
KyleMit Jan 22, 2023
b6093d3
minor typos
KyleMit Jan 22, 2023
8f26feb
add folders to src
KyleMit Jan 22, 2023
97e27e9
minor typos
KyleMit Jan 22, 2023
9c74510
share vs code config
KyleMit Jan 22, 2023
70ccd50
minor typos and md formatting
KyleMit Jan 22, 2023
20cb306
build WIP
KyleMit Jan 22, 2023
a24c401
fix paths
KyleMit Jan 22, 2023
a2e3269
set root one layer deeper
KyleMit Jan 22, 2023
82ce35e
fix global variables not found
KyleMit Jan 22, 2023
5dfa6d6
rename popup.html to index
KyleMit Jan 22, 2023
cb3afe6
add scripting permission
KyleMit Jan 22, 2023
8b69237
global vars disallowed - must use local
KyleMit Jan 22, 2023
f6388fc
minor typos
KyleMit Jan 22, 2023
65ed60b
add components barrel up file
KyleMit Jan 23, 2023
51c3163
add filings to output
KyleMit Jan 23, 2023
ff4474b
add manage-counts
KyleMit Jan 23, 2023
a2f7cdf
add disclaimer
KyleMit Jan 23, 2023
d3a1315
differentiate old vs new manifest TODO - revert name
KyleMit Jan 23, 2023
3c9d1a2
add manifest schema definition
KyleMit Jan 23, 2023
89c6836
add highlighting to template strings
KyleMit Jan 23, 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ typings/

#remove vs code files
.vs/
.vscode/
extensionDirectory-build/index.css
extensionDirectory-build/index.js
extensionDirectory-build/payload.js

build
dist
File renamed without changes.
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"tobermory.es6-string-html"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
30 changes: 30 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"json.schemas": [{
"fileMatch": [
"manifest.json"
],
"url": "https://json.schemastore.org/chrome-manifest"
}],
"markdownlint.config": {
"MD004": {
"style": "dash"
},
"MD014": false
},
"cSpell.words": [
"Ancr",
"Bncr",
"Cacr",
"Cncr",
"Excr",
"Frcr",
"Gicr",
"Lecr",
"Oecr",
"Oscr",
"Rdcr",
"Wncr",
"Wmcr",
"Wrcr"
]
}
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This project originated as a way for Vermont Legal Aid (VLA) to generate petitio

VLA runs free clinics throughout the year, but copying information off state databases and filling out petitions by hand is slow. By creating a chrome extension that generates printable files at the push of a button, volunteer attorneys help more people clear their records in every clinic.

# The Chrome extension
## The Chrome extension

[<img src="https://uploads-ssl.webflow.com/5f4f5872323e026126988212/5f56321f2220c927ad18423e_ChromeWebStore_BadgeWBorder_v2_496x150.png" width=300/>](https://chrome.google.com/webstore/detail/expungevt/kkooclhchngcejjphmbafbkkpnaimadn)

Expand All @@ -30,11 +30,11 @@ But equally important are the things it **does not** do:

## Who can use Expunge-VT?

This tool was originally developed exclusively for use by VLA in their clincs in 2018. But as volunteer attorneys use the tool in clincs, they have started using it in their own practices as well.
This tool was originally developed exclusively for use by VLA in their clinics in 2018. But as volunteer attorneys use the tool in clinics, they have started using it in their own practices as well.

- **Anyone with data access...** The extension can only be used by people who already have access to state criminal databases - the extension does not grant any data access itself. But the extension will work for anyone who has access to criminal dockets through [VT Courts Online](https://secure.vermont.gov/vtcdas/user) or [Vermont Judiciary Public Portal](https://publicportal.courts.vt.gov/Portal).

- **... but primarily attorneys.** Although anyone with data access can use this tool to generate petitions, they will need to be reviewed (and possibly corrected or modified) by an attorney familiar with expungement statutues. There are a lot of intracasies in expunging & sealing records and conflicts and inaccuracies in the official records that require expert review.
- **... but primarily attorneys.** Although anyone with data access can use this tool to generate petitions, they will need to be reviewed (and possibly corrected or modified) by an attorney familiar with expungement statutes. There are a lot of intricacies in expunging & sealing records and conflicts and inaccuracies in the official records that require expert review.

## Demo Expunge-VT

Expand Down Expand Up @@ -64,12 +64,16 @@ If you are a programmer and are interested in how the extension works, it's easy

1. Open a sample html docket from the "sampleDocketHTML" folder.

1. While viewing the sample docket page, click the chrome extension icon to begin using the exention.
1. While viewing the sample docket page, click the chrome extension icon to begin using the extension.

1. Familiarlize yourself with [how chrome extensions work](./README_EXTENSIONS_OVERVIEW.md).
1. Familiarize yourself with [how chrome extensions work](./README_EXTENSIONS_OVERVIEW.md).

## Contact Us

This tool was created by Code for BTV, in partnership with [Vermont Legal Aid](https://www.vtlegalaid.org/).

Please send questions, comments, or feedback to expungevt@codeforbtv.org

## Acronyms

- **VCOL** - TODO
49 changes: 27 additions & 22 deletions extensionDirectory/README.md → README_DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

From the user's perspective this extension can be divided as follows:

- **Extention Popup**: the popup shown when the user clicks on the extension icon in the browser.
- **Extension Popup**: the popup shown when the user clicks on the extension icon in the browser.
- **Manage Counts Page**: an edit page offering the user a web form where they can manually edit the information used by the extension
- **Petition Page**: a read-only page that provides the user with a print-view of the petitions to be printed and a side navigation with summary information and links to each section
- **CSV Export**: a button exporting (some? all?) information to CSV for download.
Expand All @@ -14,11 +14,11 @@ From the user's perspective this extension can be divided as follows:

From the developer's perspective all code for the chrome extension itself is found in `/extensionDirectory/`:

**Chrome Extention Boilerplate**
### Chrome Extension Boilerplate

The following files are part of any extension. The `manifest.json` is effectively a configuration file for the extention, but generally these files aren't used much:
The following files are part of any extension. The `manifest.json` is effectively a configuration file for the extension, but generally these files aren't used much:

```
```none
├── extensionDirectory
│   ├── manifest.json
│   ├── node_modules
Expand All @@ -30,15 +30,15 @@ The following files are part of any extension. The `manifest.json` is effectivel
│   ├── ...
```

**Chrome Extension "meat"**
### Chrome Extension "meat"

These map to the 3 primary pieces of [Application Structure](#application-structure)

- popup.html/js/css runs the extension popup
- manage-counts.html runs the Manage Counts page
- filings.html/js/css runs the Petition page

```
```none
├── extensionDirectory
│   ├── ...
│   ├── popup.css
Expand All @@ -51,15 +51,15 @@ These map to the 3 primary pieces of [Application Structure](#application-struct
│   ├── ...
```

**Supporting Files**
### Supporting Files

The remaining files have various purposes:

- `components.js` holds the vue components (used only for rendering purposes)
- `csv.js` some helper functions for letting users download a csv
- `disclaimer.html` holds the Terms & Conditions

```
```none
│   ├── ...
│   ├── components.js
│   ├── csv.js
Expand All @@ -72,50 +72,55 @@ The remaining files have various purposes:
- **Gumshoe & Smooth Scroll**: Just a couple packages to help with the navigation links on the Manage Counts page.
- **Bootstrap**: BS4 as a quick way to make things a little more pretty.

# Deploying this Chrome Extension
## Deploying this Chrome Extension

### Publishing to the Chrome Store

## Publishing to the Chrome Store
[The docs explain this](https://developer.chrome.com/docs/webstore/publish/). After you've done this once though, this all you'll need to do the next time.

**Log in**
#### Log in

1. Go to the [Chrome Developer Dashboard](https://chrome.google.com/webstore/devconsole)
2. Switch to the group publisher account (see below)
3. Click through to the ExpungeVT item

**Version bump**
#### Version bump

1. Note the current version published in the developer dashboard
2. Pick the next appropriate [semantic version](https://semver.org/) (major.minor.bug)
3. Commit

**Pem key**
### Pem key

**Create your item's zip file**
```
#### Create your item's zip file

```bash
$ cd expunge-vt/
$ cd extensionDirectory
$ zip -r ../text-only-7-19-2021.zip *
```

**Upload the zip file**
### Upload the zip file

In the Developer Dashboard, click the 'Package' nav link on the left and pick out your zip file.



## The 'ExpungeVT' publisher account
This extension is deployed under a '[group publisher](https://developer.chrome.com/docs/webstore/group-publishers/)' account which provides a group account where we can grant new developers permission to publish changes to the chrome store.

This extension is deployed under a '[group publisher](https://developer.chrome.com/docs/webstore/group-publishers/)' account which provides a group account where we can grant new developers permission to publish changes to the chrome store.

### How to add someone to the publisher account
_TODO_ - I forget how to do this. Next time we go through [the instructions](https://developer.chrome.com/docs/webstore/group-publishers/), let's document it here.

**TODO** - I forget how to do this. Next time we go through [the instructions](https://developer.chrome.com/docs/webstore/group-publishers/), let's document it here.

### Switching to the publisher acct

Simple, but hard to find: check the [top-right corner for a dropdown](https://developer.chrome.com/docs/webstore/group-publishers/) and switch from your user name to `expungevt`. If it's not there, then you'll need to be added to the group.

## Next Steps

* npm run build:watch works
* Fix images in components/popup.vue
* Create a eseparate components/filings.vue and somehow get filings.js to use the right app (filings Or popup) based on... presence of a div??
* Move shared code between components/popup.vue and components/filings.vue so its imported instead of duplicated
- npm run build:watch works
- Fix images in components/popup.vue
- Create a separate components/filings.vue and somehow get filings.js to use the right app (filings Or popup) based on... presence of a div??
- Move shared code between components/popup.vue and components/filings.vue so its imported instead of duplicated
14 changes: 10 additions & 4 deletions README_DIRECTORY_HIERARCHY.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

# Directory Hierarchy

This is a brief orientation to the most significant parts of this repo directory:

```
```none
root/
├── clinicDocs/
├── extensionDirectory/
Expand All @@ -15,24 +14,31 @@ root/
```

## clinicDocs/

This director contains copies of all the blank forms that this extension replicates and populates. These blanks are kept only as reference and not otherwise used by the extension.

## extensionDirectory/

This directory contains the code for the ExpungeVT extension and is detailed in README_EXTENSIONS_OVERVIEW.md.

## meeting notes/

Contains meeting notes from the earliest meetings with VLA during the initial attempts to define the ExpungeVT direction & purpose. Kept around mainly due nostalgia and laziness. Kinda neat tho.

## sampleDocketHTML/
Contains sample criminal dockets that have been anonomized. Very useful for testing and allows the public to demo the extension if they don't have access via the offical Vermont Case Management System.

Contains sample criminal dockets that have been anonymized. Very useful for testing and allows the public to demo the extension if they don't have access via the official Vermont Case Management System.

## civic.json

Metadata for the project. See http://open.dc.gov/civic.json/

## README_EXTENSIONS_OVERVIEW.md

Brief overview of the chrome extension inside 'extensionDirectory'.

## README.md

A markdown file that generates the website at https://codeforbtv.github.io/expunge-vt/

**NOTE**: Changes to this readme file will be deployed to the public facing site as soon as they are merged into master so make sure your changes are appropriate for the general public.
**NOTE**: Changes to this readme file will be deployed to the public facing site as soon as they are merged into master so make sure your changes are appropriate for the general public.
2 changes: 1 addition & 1 deletion README_EXTENSIONS_OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The structure of a chrome extension is primarily defined in the manifest.json fi

- `background` [[Docs](https://developer.chrome.com/extensions/background_pages)]: Background scripts are triggered by browser events such as navigating toa new page, closing a tab, etc.

* `permissions`​​ [[Docs](https://developer.chrome.com/extensions/permission_warnings)]: Chrome extensions can behave in ways that most web content is prohibited from doing. Permissions allow extensions to use certain features, such as ​access the ​cookies​ & ​storage​ for other tabs​ and​ perform​ Cross-Origin XMLHttpRequsts. Reviewing [the permission list](https://developer.chrome.com/extensions/declare_permissions) gives you a good idea of the kinds of features an extension could implement.
- `permissions`​​ [[Docs](https://developer.chrome.com/extensions/permission_warnings)]: Chrome extensions can behave in ways that most web content is prohibited from doing. Permissions allow extensions to use certain features, such as ​access the ​cookies​ & ​storage​ for other tabs​ and​ perform​ Cross-Origin `XMLHttpRequest`s. Reviewing [the permission list](https://developer.chrome.com/extensions/declare_permissions) gives you a good idea of the kinds of features an extension could implement.

## Common Extension Elements

Expand Down
38 changes: 19 additions & 19 deletions civic.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "ExpungeVT",
"description": "A chrome extension to help attorneys generate expungment & sealing petitions efficiently",
"license": "MIT",
"status": "Production",
"type": "Chrome Browser Extension",
"homepage": "https://codeforbtv.github.io/expunge-vt/",
"repository": "https://github.com/codeforbtv/expunge-vt",
"thumbnail": "https://codeforbtv.github.io/expunge-vt/extensionDirectory/images/icon_128.png",
"name": "ExpungeVT",
"description": "A chrome extension to help attorneys generate expungement & sealing petitions efficiently",
"license": "MIT",
"status": "Production",
"type": "Chrome Browser Extension",
"homepage": "https://codeforbtv.github.io/expunge-vt/",
"repository": "https://github.com/codeforbtv/expunge-vt",
"thumbnail": "https://codeforbtv.github.io/expunge-vt/extensionDirectory/images/icon_128.png",
"geography": [
"Vermont"
],
],
"contact": {
"name": "Jake Durell",
"email": "expungevt@codeforbtv.org",
"name": "Jake Durell",
"email": "expungevt@codeforbtv.org",
"url": ""
},
},
"partners": [
{
"url": "https://www.vtlegalaid.org/",
"name": "Vermont Legal Aid",
"url": "https://www.vtlegalaid.org/",
"name": "Vermont Legal Aid",
"email": ""
}
],
"data": [],
],
"data": [],
"tags": [
"civictechindex",
"code-for-all",
"code-for-america",
"code-for-btv"
],
],
"links": [
"https://vtdigger.org/2019/11/12/legal-expungement-clinic-offers-vermonters-a-chance-to-start-over/",
"https://vermontbiz.com/news/2020/october/24/state-hold-expungement-tele-clinic-brattleboro-nov-13",
"https://www.govtech.com/civic/Vermont-Attorneys-Leverage-Open-Source-Expungement-Plug-In.html",
"https://pmicv.org/index.php?option=com_content&view=article&id=369:pmi-cv-volunteerism-at-work-expunge-vt-with-code-for-btv&catid=112&acm=_304",
"https://rotaryclubofcsh.org/Stories/code-for-btv"
],
],
"id": "https://raw.githubusercontent.com/DCgov/civic.json/master/schemas/schema-v1.json"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading