Skip to content

Commit

Permalink
Example and binary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peteraba committed May 5, 2020
1 parent a3feba7 commit 1f8027e
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 278 deletions.
69 changes: 36 additions & 33 deletions cmd/roadmapper/browser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,41 @@ const (
e2eDbUser = "rdmp"
e2eDbPass = "secret"
e2eBaseUrl = "http://localhost:9876/"
e2eTitle = "Example Roadmap"
e2eTxt = `Monocle ipsum dolor sit amet
Ettinger punctual izakaya concierge [2020-02-02, 2020-02-20, 60%]
Zürich Baggu bureaux [/issues/1]
Toto Comme des Garçons liveable [2020-02-04, 2020-02-25, 100%, /issues/2]
Winkreative boutique St Moritz [2020-02-06, 2020-02-22, 55%, /issues/3]
Toto joy perfect Porter [2020-02-25, 2020-03-01, 100%, |1]
Craftsmanship artisanal
Marylebone exclusive [2020-03-03, 2020-03-10, 100%]
Beams elegant destination [2020-03-08, 2020-03-12, 100%, |1]
Winkreative ryokan hand-crafted [2020-03-13, 2020-03-31, 20%]
Nordic Toto first-class Singap
Concierge cutting-edge Zürich global bureaux
Sunspel sophisticated lovely uniforms [2020-03-17, 2020-03-31]
Share blog post on social media [2020-03-17, 2020-03-31, 80%]
Talk about the tool in relevant meetups [2020-04-01, 2020-06-15, 20%]
Melbourne handsome boutique
Boutique magna iconic
Carefully curated laborum destination [2020-03-28, 2020-05-01, 60%]
Qui incididunt sleepy
Scandinavian occaecat culpa [2020-03-26, 2020-04-01, 90%]
Hand-crafted K-pop boulevard
Charming sed quality [2020-03-18, 2020-05-31, 20%]
Sunspel alluring ut dolore [2020-04-15, 2020-04-30, 30%]
Business class Shinkansen [2020-04-01, 2020-05-31, 45%]
Nisi excepteur hand-crafted hub
Ettinger Airbus A380
Essential conversation bespoke
Muji enim
|Laboris ullamco
|Muji enim finest [2020-02-12, https://example.com/abc, bcdef]`
e2eTitle = "How To Start a Startup"
e2eTxt = `Find the idea [2019-07-20, 2020-01-20, 100%]
Look for things missing in life
Formalize your idea, run thought experiments [https://example.com/initial-plans]
Survey friends, potential users or customers [https://example.com/survey-results]
Go back to the drawing board [https://example.com/reworked-plans]
Validate the idea [2020-01-21, 2020-04-20]
Make a prototype #1 [2020-01-21, 2020-04-10, 100%, TCK-1, https://github.com/peteraba/roadmapper, |1]
Show the prototype to 100 people #1 [2020-04-11, 2020-04-20, 80%, TCK-123]
Analyse results [2020-04-21, 2020-05-05]
Improve prototype [2020-05-06, 2020-06-06]
Show the prototype to 100 people #2 [2020-06-07, 2020-06-16]
Analyse results [2020-06-16, 2020-06-30]
Improve prototype [2020-07-01, 2020-07-16]
Show the prototype to 100 people #2 [2020-07-17, 2020-07-25]
Start a business
Learn about your options about various company types [2019-07-20, 2020-08-31]
Learn about your options for managing equity [2019-07-20, 2020-08-01]
Find a co-founder [2020-04-20, 2020-08-31]
Register your business [2020-08-01, 2020-09-30, |2]
Look for funding [2020-08-01, 2020-10-31]
Build a team [2020-11-01, 2020-12-15]
Build version one [2021-01-01, 2021-04-15]
Build version one [2021-01-01, 2021-03-31]
Launch [2021-04-01, 2021-04-15, |3]
Grow [2021-04-16, 2021-12-31]
Follow up with users
Iterate / Pivot
Launch again
Get to 1,000 users
Plan next steps
|Create the first prototype
|Start your business
|Lunch version one`
e2eBaseURL = "https://example.com/foo"
)

Expand Down Expand Up @@ -95,7 +98,7 @@ func TestE2E_Browser(t *testing.T) {
txt: e2eTxt,
title: e2eTitle,
baseURL: e2eBaseURL,
svgMatch: "Monocle ipsum dolor sit",
svgMatch: "Find the idea",
},
}
for _, tt := range tests {
Expand Down
2 changes: 0 additions & 2 deletions cmd/roadmapper/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:generate go-bindata -pkg bindata -o ../../pkg/bindata/bindata.go ../../res/migrations/ ../../res/templates/ ../../res/fonts/...

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//go:generate go-bindata -pkg bindata -o pkg/bindata/bindata.go res/migrations/ res/templates/ res/fonts/...

package roadmapper
364 changes: 157 additions & 207 deletions pkg/bindata/bindata.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (m *Migrations) Down(steps int) (int, error) {
source := &migrate.AssetMigrationSource{
Asset: bindata.Asset,
AssetDir: bindata.AssetDir,
Dir: "../../res/migrations",
Dir: "res/migrations",
}

n, err := migrate.ExecMax(m.conn, "postgres", source, migrate.Down, steps)
Expand All @@ -67,7 +67,7 @@ func (m *Migrations) Up(steps int) (int, error) {
source := &migrate.AssetMigrationSource{
Asset: bindata.Asset,
AssetDir: bindata.AssetDir,
Dir: "../../res/migrations",
Dir: "res/migrations",
}

n, err := migrate.ExecMax(m.conn, "postgres", source, migrate.Up, steps)
Expand Down
2 changes: 1 addition & 1 deletion pkg/roadmap/html_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var dateFormatMap = map[string]string{
func (r *Roadmap) viewHtml(appVersion, matomoDomain, docBaseURL, currentURL string, selfHosted bool, origErr error) (string, error) {
writer := bytes.NewBufferString("")

layoutTemplate := bindata.MustAsset("../../res/templates/index.html")
layoutTemplate := bindata.MustAsset("res/templates/index.html")

t, err := template.New("layout").Parse(string(layoutTemplate))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/roadmap/image_rendering.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (vr *VisualRoadmap) Draw(fullW, lineH float64) *canvas.Canvas {
fullH := lineH*float64(len(vr.Projects)) + headerH

fontFamily = canvas.NewFontFamily("roboto")
font, err := bindata.Asset("../../res/fonts/Roboto/Roboto-Regular.ttf")
font, err := bindata.Asset("res/fonts/Roboto/Roboto-Regular.ttf")
if err != nil {
panic(fmt.Errorf("font file not readable: %w", err))
}
Expand Down
67 changes: 35 additions & 32 deletions static/roadmap-form.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -347,38 +347,41 @@ export const roadmapForm = elems => {

loadExampleBtn.addEventListener('click', _ => {
saveHistory(titleField);
titleField.value = 'Example Roadmap';
txtField.value = `Monocle ipsum dolor sit amet
Ettinger punctual izakaya concierge [2020-02-02, 2020-02-20, 60%]
Zürich Baggu bureaux [/issues/1]
Toto Comme des Garçons liveable [2020-02-04, 2020-02-25, 100%, /issues/2]
Winkreative boutique St Moritz [2020-02-06, 2020-02-22, 55%, /issues/3]
Toto joy perfect Porter [2020-02-25, 2020-03-01, 100%, |1]
Craftsmanship artisanal
Marylebone exclusive [2020-03-03, 2020-03-10, 100%]
Beams elegant destination [2020-03-08, 2020-03-12, 100%, |1]
Winkreative ryokan hand-crafted [2020-03-13, 2020-03-31, 20%]
Nordic Toto first-class Singap
Concierge cutting-edge Zürich global bureaux
Sunspel sophisticated lovely uniforms [2020-03-17, 2020-03-31]
Share blog post on social media [2020-03-17, 2020-03-31, 80%]
Talk about the tool in relevant meetups [2020-04-01, 2020-06-15, 20%]
Melbourne handsome boutique
Boutique magna iconic
Carefully curated laborum destination [2020-03-28, 2020-05-01, 60%]
Qui incididunt sleepy
Scandinavian occaecat culpa [2020-03-26, 2020-04-01, 90%]
Hand-crafted K-pop boulevard
Charming sed quality [2020-03-18, 2020-05-31, 20%]
Sunspel alluring ut dolore [2020-04-15, 2020-04-30, 30%]
Business class Shinkansen [2020-04-01, 2020-05-31, 45%]
Nisi excepteur hand-crafted hub
Ettinger Airbus A380
Essential conversation bespoke
Muji enim
|Laboris ullamco
|Muji enim finest [2020-02-12, https://example.com/abc, bcdef]`;
titleField.value = 'How To Start a Startup';
txtField.value = `Find the idea [2019-07-20, 2020-01-20, 100%]
Look for things missing in life
Formalize your idea, run thought experiments [https://example.com/initial-plans]
Survey friends, potential users or customers [https://example.com/survey-results]
Go back to the drawing board [https://example.com/reworked-plans]
Validate the idea [2020-01-21, 2020-04-20]
Make a prototype #1 [2020-01-21, 2020-04-10, 100%, TCK-1, https://github.com/peteraba/roadmapper, |1]
Show the prototype to 100 people #1 [2020-04-11, 2020-04-20, 80%, TCK-123]
Analyse results [2020-04-21, 2020-05-05]
Improve prototype [2020-05-06, 2020-06-06]
Show the prototype to 100 people #2 [2020-06-07, 2020-06-16]
Analyse results [2020-06-16, 2020-06-30]
Improve prototype [2020-07-01, 2020-07-16]
Show the prototype to 100 people #2 [2020-07-17, 2020-07-25]
Start a business
Learn about your options about various company types [2019-07-20, 2020-08-31]
Learn about your options for managing equity [2019-07-20, 2020-08-01]
Find a co-founder [2020-04-20, 2020-08-31]
Register your business [2020-08-01, 2020-09-30, |2]
Look for funding [2020-08-01, 2020-10-31]
Build a team [2020-11-01, 2020-12-15]
Build version one [2021-01-01, 2021-04-15]
Build version one [2021-01-01, 2021-03-31]
Launch [2021-04-01, 2021-04-15, |3]
Grow [2021-04-16, 2021-12-31]
Follow up with users
Iterate / Pivot
Launch again
Get to 1,000 users
Plan next steps
|Create the first prototype
|Start your business
|Lunch version one`;
setSelectedIndex(dateFormatField, '2006-01-02');
baseUrlField.value = 'https://example.com/foo';

Expand Down

0 comments on commit 1f8027e

Please sign in to comment.