question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not setting value of timeline tag

See original GitHub issue

https://github.com/Darakah/obsidian-timelines/blob/685dddb902b990085af34c94fe6170112daf1c8a/main.ts#L202

Since you’re not setting the value here, the field won’t get populated when the user restarts Obsidian.

Style-nit: you switch between camelCase, PascalCase, and snake_case a lot. Javascript and Typescript styleguides tend to prefer camelCase for all variable names and function names.

It’s a lot safer to use string interpolation like this:

const someString = `my name is ${name}`;

rather than using +. + is weird in JS and you might unknowingly cast a string to a number.

https://github.com/Darakah/obsidian-timelines/blob/685dddb902b990085af34c94fe6170112daf1c8a/main.ts#L25 _this is unused.

https://github.com/Darakah/obsidian-timelines/blob/685dddb902b990085af34c94fe6170112daf1c8a/main.ts#L79-L82 I recommend using a code formatter since your indentation is often incorrect, making it hard to review.

https://github.com/Darakah/obsidian-timelines/blob/685dddb902b990085af34c94fe6170112daf1c8a/main.ts#L90 I don’t think this works? Number.isInteger("1") returns false.

https://github.com/Darakah/obsidian-timelines/blob/685dddb902b990085af34c94fe6170112daf1c8a/main.ts#L122 When is this nullable? You probably want to filter instead otherwise the alternation logic won’t work.

I really recommend against building the html with string concatenation since it’s easy to make a mistake and it’s hard to debug. Also, since you’re using user data, it will need to be properly escaped - right now a user can’t use ' in their description.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
liamcaincommented, Feb 7, 2021

Oh, I see. You are parsing the string as a number by prepending it with a slash. It’s probably easier just to validate the date with MomentJS (you can use window.moment(formattedStr) here) instead if you can make assumptions about how the date is formatted.

0reactions
liamcaincommented, Feb 9, 2021

Okay, sounds like the behavior is intended.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Facebook timeline and tagging settings 2020 - YouTube
prwilsonmedia #freesocialmediatraining Please join my Free social media training group on Facebook: ...
Read more >
How to Manually Approve Facebook Posts You're Tagged in
Then, choose Settings & Privacy, followed by Activity Log. Click on “Timeline, Photo and Tag Review” to see any pending posts. Facebook Activity ......
Read more >
How to Stop Other People Posting on Your Facebook Timeline
In the dropdown menu, click on Settings. Using the panel on the left-hand side of the screen, navigate to the Timeline and Tagging...
Read more >
How to Control What Appears on Your Facebook Timeline
Press the “More” button in the bottom right corner and choose “Settings.” Then select “Account Settings.” Choose “Timeline and Tagging” from the ...
Read more >
Set up the timeline control - Power Apps - Microsoft Learn
You can't change the default heading label that is displayed as Timeline on the form during app runtime. Records shown on page. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found