Jason Leow

Indie hacker, solopreneur | Creating a diverse portfolio of products + services.

Day 65 - Learning as a product https://golifelog.com/posts/learning-as-a-product-1615024377528

"A lot of successful creators set out to learn a skill, and their account is a public diary. It’s a feedback mechanism.They’re focused on understanding and learning, and less so on building an audience or monetizing. If you learn a skill effectively in public, people who also want to learn that skill will follow you and tag along on your journey." - @ljin18 about the Creator Economy, on Clubhouse

✍️ Got inline editing for comments working!

Kudos to this video tutorial by Vue Screencasts
https://www.youtube.com/watch?v=aV3B3n6YRPg&t=352s

Things I did differently from the tutorial:
- wrapped the edit 'button' links within v-if="isAuthenticated" so that only logged in users will be able to access
- added if statement so that logged in user can only edit her own comments

- had to debug PUT request not going through by removing the @blur=setToView() event listener and function, because it was removing the data from the PUT request when I click on the button outside of textarea (which at same time, blurs it and activates the function)
- must add a clickoutside event listener &/or close button to close the setToEditing function

Researching Gumroad alternatives that use Stripe instead of Paypal

Found Podia, Sellfy and Flurly

Podia
https://podia.com/
- big brand, can sell all things digital (even courses), but $39/mo

Sellfy
https://sellfy.com/
- has Paypal and Stripe, platform even prints tshirts on demand for you, includes video streaming, $19/mth, no cuts

Flurly
https://flurly.com/
- made by indie hacker, sells digital downloads (even looks a bit like Gumroad!), has cool features for makers like purchase power parity, collabs, even memberships (like Patreon), and just 1% cut (on top of Stripe processing fees)


I think the choice is clear...

Day 64 - Body over mind https://golifelog.com/posts/body-over-mind-1614931435821

"People generally have more control over their actions than their feelings. But we can influence our feelings by taking action. Take one small step. Move the body first and the mind will follow." ~ James Clear

Fixed bug where hitting arrow key after on Enter selection removes the username

[Video shows the bug]

Added if statement where the functions onArrowup() and onArrowDown() is activated only when tooltip element === visible. So that selected username (after onEnter) wouldn't disappear if arrow keys are pressed.

[Post dated] Deployed yesterday's fixes!

🛠 Lifelog fixes

📟 Fixed a bug for the new @-mention autocomplete feature where you can't @-mention in the middle of a sentence. Also fixed a UI quirk for tooltip menu scrolling - removed the sticky top item scrolling, now it resembles a normal menu scrolling.

⚠️ Fixed the bug AGAIN that @Lobacrow highlighted, where the comment posted popup re-appeared if you go back to the post page.

🌐 Added SEO meta tags to posts pages.
Jason Leow Author

Hmm no, why? :)

0 Likes

Did you see nuxt vite?

0 Likes

Fixed slooow login due to over-fetching

Added /extensions/users-permissions/controllers/Auth.js folder and file, and added empty array option to .findOne(query, []) in line 71 to remove relational data from the data fetched from auth endpoint

Fixed bug for @mention autocomplete feature where the tooltip pops up even when there's characters before the "@" e.g. typing an email address

Video below shows how it now works as intended. When there's any characters directly before "@", the tooltip wouldn't trigger. Only when there's a white space before the "@" would it trigger. But it works still if there's any chars after "@" - it'll just insert the username before the chars.

Had to switch away from using @keydown.@ event listener to just @input because former 'ignores' the @ as part of input.value! And added an if statement where if(keystrokeTriggered) then showTooltip().

Fixed bug for @mention autocomplete feature where the tooltip pops up if one is typing an email address

🤜💥🕷💥🤛 Fixed bug where you can't @mention in the middle of a sentence

(Video shows the bug.)

Had to dump regex yet again, because it's shown to be too hard to fix for edge UI cases like this (where you have to insert the username in between words). Or I simply am too tired to try...

.replace(/@(\w+)$|@$/)

In the end, used another part of the awesome code from the [textarea-caret-position](https://github.com/component/textarea-caret-position) repo. It used a combo of all Javascript methods - slice, split, endsWith, substr, setSelectionRange. More convoluted, not as elegant and simple as regex, but it gets the job done.

The above was for selection on keydown of enter key. Also removed regex from mouse click selection too.

Fixed "comment posted" snackbar bug AGAIN

Looks like setting the element's display style to none didn't work:

document.getElementById('snackbar').style.display = 'none'

Because on v-if, the element doesn't even exist in the HTML to be read! Changed it to v-show, and instead of accessing the element id, I used the data attribute `success` to toggle the display: none style for the snackbar. Also cleaned up the setTimeout function by having another function for toggling the `this.success` value.

setTimeout(this.hideSnackbar, 3000)

hideSnackbar() {
this.success = null
},

Day 63 - Goals + Systems = Winning repeatedly https://golifelog.com/posts/goals-systems-winning-repeatedly-1614840215335

Goals powered by systems, and systems guided by goals, are for people who care about winning repeatedly.

Fixed UI quirk for tooltip menu scrolling

Before: The top item was 'sticky', and the list scrolled past the fixed point
Now: Resemble normal scrolling menus where the active item scrolls down the viewable list, then scrolling kicks in on selection of off-screen item.

Discovered and played around with Debuggex - love how it visualizes your regex!

https://www.debuggex.com/

Added SEO tags to posts pages

Love how Nuxt.js makes it so easy to access data and computed properties in by adding it as a function -

head() { return { meta: [], }}

Day 62 - Addicted to the challenge https://golifelog.com/posts/addicted-to-the-challenge-1614759203421

I always described myself and my personality as not best fit to the task of programming, to the work of a developer. But perhaps from this experience—and all the past adventures—I might have found some character trait (or flaw) that I can look to as saving grace for my coding endeavour.

To be able to finally say, “Yes, I can code.”

To be able to say to myself, that there’s this particular part of me that gels well with coding. This addiction to the challenge. A challenge. Any challenge.

I can live with that.

🚢⛴🛳🛥🚤⛵️🛶 Did I just ship the @mention autocomplete & notification feature? Feels unreal 🤪

✅ Lifelog updates

📟 FINALLY, the @mention autocomplete and notifications feature in comments is up! This is probably the longest time (yet) that I ever took to develop a feature - started on 11 Feb, ie ~3 weeks! Was probably also the hardest so far - fact that I DIY-ed it didn't help with speed, but I learned loads. Thanks to @haideralmosawi for the feature suggestion, and @yuyu @keenencharles for all the help debugging this feature. You guys rock.

🔧 Fixed the bug that @Lobacrow highlighted, where the comment posted popup re-appeared if you go back to the post page.

☝️ Added the many features requested over the past 3 weeks to the roadmap! Thanks @Lobacrow @brianball @haideralmosawi for all the enthusiastic posts and discussions.

💄 Cosmetic CSS tweaks to make @mention autocomplete tooltip prettier

Added box shadow, border radius, Droid font, and a slightly different shade of grey for arrow key selection vs mouse selection (nano UI to let users know when mouse cursor overlaps with arrow key selection).

Tried adding an up caret to the tooltip to point the tooltip to where the username will be inserted, but got tired of trying to unwrangle CSS between overflow:auto and unhiding the up caret. Just want to launch this freaking thing!

🤞🤞🤞 I think I finally finally finally solved the @mention autocomplete feature

Had to dump regex to fix the trailing cursor problem from yesterday, and use some code from a textarea-caret-position package from the Github user Component. And it worked!

Spent rest of day dolling it up with a caret pointer (that was also semi-difficult!), and adding scroll with arrow keys using scrollTo() and scrollBy().