Skip to content

Present SRS metadata with a colored pill, instead of raw text attributes - #134

Open
tntmarket wants to merge 1 commit into
roam-unofficial:masterfrom
tntmarket:prettify_srs_metadata
Open

Present SRS metadata with a colored pill, instead of raw text attributes#134
tntmarket wants to merge 1 commit into
roam-unofficial:masterfrom
tntmarket:prettify_srs_metadata

Conversation

@tntmarket

Copy link
Copy Markdown
Contributor

This reverts to the [[]] style of block properties, in order to be able to fully hide the metadata with css. The metadata is still readable if you edit the block.

It displays the review interval, and colors the pill according to the ease factor.

I'm not sure if I should include the css in roam-toolkit itself. Maybe better to link to some example css in the documentation, in case it looks ugly with certain css themes, or if people want to tune the presentation based on values.

Screen Shot 2020-07-12 at 3 20 19 AM

Here is the full css being generated: https://gist.github.com/tntmarket/9dc7179e9c8c0357b87fbbeed3eedfc9

@tntmarket tntmarket added the srs label Jul 12, 2020
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Stvad

Stvad commented Jul 12, 2020

Copy link
Copy Markdown
Member

I like it but am a bit conflicted :)
The reason for moving away from the old format was to get rid of thousands of additional pages generated by liberal use of SRS (each unique interval and each unique factor gets a page)

Regarding injecting CSS - I think it's ok to do so, as long as people can override styles (so we should have doc on those)

Also a majority of my prompts would be in 1+ month :) I'd like more granularity then that (probably up to a few years)

@Stvad

Stvad commented Jul 12, 2020

Copy link
Copy Markdown
Member

As a curiousity/fyi - another way to make the thing render in "special way" is to surround it with double {} like {{[[interval]]:5}}. That's gonna render as a button, won't create an additional page, but the button won't have the special css classes either though =\

Comment thread src/ts/core/srs/srs.ts Outdated
.map(days => intervalStyle(`${days}.`, `${days} days`))
.join('\n')}
${range(7, 30)
.map(days => intervalStyle(`${days}.`, `${Math.floor(days / 7)} weeks`))

@Stvad Stvad Jul 13, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd actually like to see the fractions here (to a first decimal) (same for months/years)

@Stvad

Stvad commented Aug 16, 2020

Copy link
Copy Markdown
Member

the days should be shifted in +1 direction for this as the fractions are rounded up for the purposes of scheduling. so interval 4.2 would result in scheduling in 5 days.

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Jaydon-chai

Copy link
Copy Markdown

Is it possible to add css buttons that can do the function of ctrl-shift-x ? for how well recall is?

@Stvad

Stvad commented Aug 25, 2020

Copy link
Copy Markdown
Member

It's possible, but it'd involve more then just CSS, it'd require custom rendering of blocks. Which is not trivial (not that complicated either, but requires some work)

@tntmarket
tntmarket force-pushed the prettify_srs_metadata branch from b5d5fa7 to b1f66fb Compare October 11, 2020 19:07
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Stvad

Stvad commented Oct 11, 2020

Copy link
Copy Markdown
Member

@tntmarket are you just updating the current version with latest changes from master, or did you find a way to make it work better?

@tntmarket

Copy link
Copy Markdown
Contributor Author

@tntmarket are you just updating the current version with latest changes from master, or did you find a way to make it work better?

Oh sorry, I've just been pushing my personal customizations to this branch, I'll start using another branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants