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

feat/std tui #51

Closed
wants to merge 27 commits into from
Closed

feat/std tui #51

wants to merge 27 commits into from

Conversation

blaggacao
Copy link
Collaborator

@blaggacao blaggacao commented Apr 15, 2022

		dialog := lipgloss.Place(width, 9,
			lipgloss.Center, lipgloss.Center,
			dialogBoxStyle.Render(ui),
			lipgloss.WithWhitespaceChars("猫咪"),
			lipgloss.WithWhitespaceForeground(subtle),
		)
  • optional for first iteration: add std ... correspondence CLI commands based on cobra

Hack this branch:

cd cells/std/cli
watchexec -rw . "go mod vendor && go run ."

Copy link
Collaborator Author

@blaggacao blaggacao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideas for setting up readme testdata

Comment on lines 66 to 71
type item struct {
name string `json:"__std_name"`
organelle string `json:"__std_organelle"`
cell string `json:"__std_cell"`
clade string `json:"__std_clade"`
description string `json:"__std_description"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add here:

readme string `json:"__std_readme`

clades []string
cladeIndex int
descs []string
descIndex int
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here an appropriate implementarion for generating dummy simple markdowm readmes

"Sure, why not?",
}

r.shuffle.Do(func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r.shuffle has just been unconditionally created in this very function, so it will always execute code in this anonymous function, set "done" flag internally and will never be touched again.

"Sure, why not?",
}

r.shuffle.Do(func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment on lines 248 to 249
r.mtx.Lock()
defer r.mtx.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also I saw only one place where these generators are called and it's very not threaded, so I don't think locks are needed here.

@blaggacao
Copy link
Collaborator Author

Maybe this PR is relevant? charmbracelet/bubbletea#237

@blaggacao
Copy link
Collaborator Author

This landed mostly in master via: ab72ee0

@blaggacao blaggacao closed this Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants