Video call with potential web design client, but their needs are not suited for JAMstack. Despite, offered tips and resources for site optimisation. Always give value, even if not customer!
🤑 Replied potential ad buyer with ad options
Got wonky autocomplete typing for @mention feature working somehow
Organic sharing/marketing on Twitter
Day 53 - Debugging is a linear process https://golifelog.com/posts/debugging-is-a-linear-process-1613975794908
Fixed markdown typos errors on request by @peterdannock
Day 52 - DIY code movement? https://golifelog.com/posts/diy-code-movement-1613886486547
Just for the heck of it."
🤸♀️🤸♀️🤸♀️ SOLVED it! Finally figured out the @mention feature
Tried a different approach inspired by the ternary conditional. Used a function to listen to the tooltip list, if it's visible, then switch on the text insert function. And it worked!!!
listenEnter() {
const visibleList = document.getElementById("usernamesList").style.visibility;
if (visibleList === "visible") {
return this.onEnter();
} else {
return null;
}
},
https://codepen.io/jasonleow/pen/eYBERMV
Now for the last part haha.. autocomplete search through username list as the user types...😫
@Mostdefkima3ff thank you! It's definitely coming together now. Almost…there…
I seriously commend you for pushing through with this super difficult task. Kudos for your progress thus far :)
Some progress on the @mention feature today
typeInTextarea(el, newText) {
const [start, end] = [el.selectionStart, el.selectionEnd]
el.setRangeText(newText, start, end, 'select')
},
But now I got an issue with the enter key. When I press enter again after inserting username, instead of adding a new line/carriage return, it inserts the username again (and again and again when I hit enter)! So basically using the enter key for adding a new line is completely shot now. 😵
Found ref, described the @mention functions needed perfectly: https://medium.com/streak-developer-blog/the-complexities-of-implementing-inline-autocomplete-for-content-editables-e358c0ed504b
@Mostdefkima3ff thanks for the suggestion! :) Yeah am aware of tribute and a few others - vue-at, vue-mention. They are in my fallback plans for sure.. I'm trying to give it 1 more day of trying before I give up. And I'm sooo close urgh..like 80-90% there…
The mention stuff is a headache so I opted not to try to do that from scratch. I use At-Who but it's no longer maintained .. the alternative is https://github.com/zurb/tribute if you decide that building it from scratch becomes too much of a hassle. If not, ignore my comments :)
Day 51 - Marketing: Back to basics https://golifelog.com/posts/marketing-back-to-basics-1613807063744
Organic sharing/marketing on Twitter
Day 50 - 'Discovering' cold marketing on Twitter https://golifelog.com/posts/discovering-cold-marketing-on-twitter-1613721226197
Celebrating 🔥800 days of making!! WOOHOO 🥳
Organic sharing/marketing on Twitter
😅 Finally solved the @mention notification feature! Wow that was hard
* detect @ in the username text input inside a textarea, using regex .match(/@\w+/g), and then using map() and substring() to put them into an array without the @ prefix. Mount and watch this function to detect @ as the user types.
* because there's some data from 2 endpoints that needs to be prefetched for the next function to work and I didn't want to figure out how to synchronously chain that data fetching to the @submit event, I wrote a function that runs when user clicks on textarea, using @focus. That way the data is ready way before the comment is submitted.
* then comes the actual function to POST the @mention notifications. Use filter-includes-map or forEach-if-push to create an array of user ids from the username array from the 1st step. Then map() and for() loop through each of these user ids to run the POST request, including 3 if-else-if conditions to prevent double notifications. The hard part was how to compare an array to another array within a if condition! But I realised I just needed a boolean true/false from array2.includes(element) with the element from array1.map(element => ...)
Day 49 - Morning recitals & reflections https://golifelog.com/posts/morning-recitals-and-reflections-1613638942437
“I’ll learn my way towards $5k MRR by end 2021. In return, I’ll have fun growing my indie products, and adhere to a happy, healthy habit system. And I’ll surrender.”
I went into this thinking that it’s a way for me to visualize my goal......But two weeks on, I’m discovering a different reason, a better reason. It’s really for introspection, to reflect if I had diligently studied and put into practice what I claim to aspire towards. First thing in the morning, without distractions, mind clear, room quiet. Nothing to run away to or from. Just plain witnessing, a mirror check on the integrity of my actions to my word. It’s not easy, for sure.
FINALLY! Figured out how to compare 2 different data arrays for the new @mention notificaiton feature. Kudos to my Nuxt mates @yuyu and @keenencharles for all the help! 🍻
forEach() - if() - push()
OR
filter() - includes() - map()
Organic sharing/marketing on Twitter
Just chatting casually
Offering tips and hacks
RT to amplify and help
Day 48 - Authenticity requires ambiguity https://golifelog.com/posts/authenticity-requires-ambiguity-1613550092805
Fixed bug where "Comment posted" snackbar appears again when hitting back to go back to post page
setTimeout(function () {
document.getElementById('snackbar').style.display = 'none'
}, 3500)
Organic sharing/marketing on Twitter
Day 47 - Readings for Fund Feb https://golifelog.com/posts/readings-for-fund-feb-1613461230974
Here’s the one relevant to indie hackers that I’m excited to get into:
Marketing Examples
https://marketingexamples.com/
Indie Hackers Growth Bites
https://www.indiehackers.com/growth-bites
Growth Examples
https://growthexamples.com/
Zero To Sold
https://thebootstrappedfounder.com/zero-to-sold/
Make book
https://makebook.io/
https://dariusforoux.com/stoic-path-to-wealth/
Side Hustle Stack
https://sidehustlestack.co/
Other resources, communities, podcasts and Clubhouse rooms about marketing
Also looking out for more great content, especially podcasts. Found a few Clubhouse rooms about marketing, will probably check them out if they’re just sleazy scams or the real deal.
Anything else I missed?
Tried making my own @mention popover component for textarea for the past 2 days, but failed. Plan B: just install a damned package.
Re-started Facebook ads 15-28 Feb for
Organic sharing/marketing on IH and Twitter
writing habit
#ship30for30
#200wordsaday
#amwriting
#writingcommunity
Steps: Go for Top tweets under each search query/hashtag first. Once exhausted, then Latest.