jjaimealeman / wdb-get-good-with-git

A collaborative repo for the members of the Udemy course: The Web Developer Bootcamp - by Colt Steele.
https://jjaimealeman.github.io/wdb-get-good-with-git/
MIT License
7 stars 8 forks source link

aaron.html - hover doesn't work in webkit #14

Closed aaron-watts closed 3 years ago

aaron-watts commented 3 years ago

Webkit based browsers (chromium/epiphany) disable mouseover event on disabled buttons. Only working in firefox.

jjaimealeman commented 3 years ago

@aaron-watts You got a code sample I could test out?

I got

aaron-watts commented 3 years ago

It's in the last commit, you just need to go to my page - just needs to be un-disabled but it's an interesting difference in browser behaviour that I can't seem to find on MDN so thought I would log it. I've also noticed that the syntax highlighter doesn't work in epiphany browser (safari webkit), but I'll start working on a smarter version shortly so I'm not too worried about that yet (it didn't approve of my terrible regex attempt!)

jjaimealeman commented 3 years ago

@aaron-watts

You're getting me excited to see what you are working on.

For my personal /users page, I thought it would be cool to play with the Github API and display the latest commit hash (truncated to first 8 char), author, and commit message.

After seeing what Shakti did with his movie API, I wanted to experiment. And I'm awaiting for confirmation from Twitter about using their API setup, so I can play with that and show my latest tweets.

Never messed around with API calls before. Pretty exciting!


I'll take care of your PR as soon as I see it pop up.

aaron-watts commented 3 years ago

You're getting me excited to see what you are working on

Well the original idea was simple, but I've done my usual and have become highly invested and a bit carried away! :laughing:

I thought it would be cool to play with the Github API

Looking forward to seeing it, I haven't looked at their API yet, but it's on my to do, so will have a look through your code when it's up

jjaimealeman commented 3 years ago

@aaron-watts Here's what it looks like at the moment https://i.imgur.com/QKOwHWX.png

Trying to find more data to output, but I keek hitting the Limit Threshold. It's something like 500 per hour?!

I have generate the author Token, but haven't figured out how to "embed" it in the code without making it public.

jjaimealeman commented 3 years ago
    ####    ####    ####      Jaime Aleman ~ git version 2.30.2
   ##  ##  ##      ##         ---------------------------------
   ##       ####    ####      Project: wdb-get-good-with-git (2 branches)
   ##  ##      ##      ##     HEAD: 5057a5c (main, origin/main)
    ####    ####    ####      Created: a week ago
                              Languages: CSS (54.2 %) HTML (28.8 %) 
 ##########################              JavaScript (17.0 %) 
 ##########################   Authors: 64% Jaime Aleman 36
 ##########################            29% aaron-watts 16
 #####                #####            4% Shakti 2
 #############        #####   Last change: 17 hours ago
 ##########      #########    Contributors: 5
  #####        ###########    Repo: https://github.com/jjaimealeman/wdb-get-good-with-git.git
  #####              #####    Commits: 56
  ###############    #####    Lines of code: 565
  #####    ######    #####    Size: 531.23 KiB (30 files)
  #####              ####     License: MIT
   #####            #####     
   ######################                             
    ####################   
       ##############      

lol, check this out https://github.com/o2sh/onefetch

Just installed it

aaron-watts commented 3 years ago

I have generate the author Token, but haven't figured out how to "embed" it in the code without making it public.

Unfortunately it can't be done working with only frontend, at least to my knowledge. There are ways to obscure it, but it can accessed by someone that knows where to look. You'd need a backend to fully obscure it.

aaron-watts commented 3 years ago

Do you know any backend yet? A solution would be to create a "middle-api". Host a very basic server somewhere like heroku, it's only job would need to be to handle your api calls that require authentication, and send the data back as a response. I've not done this bit before myself but you could probably set a security measure that it only handles calls made from this repo's url. You would just set your fetch requests to contact that api instead of GitHubs, in much the same way Shakti's fetch is to the movies api that he used.

You also have the option then to create a local SQLite database on the server, that could store the fetched data, and only make a request to GitHub if the last one was not done within the last X hours, which would also prevent your quota from being used up.

jjaimealeman commented 3 years ago

Do you know any backend yet?

@aaron-watts

hhmm, not enough at the moment. damnit.

I really wanna throw this up but don't want the token visible.

I'll do it later so you can see it and suggest a work-around?!

aaron-watts commented 3 years ago

If you want, I'm happy to help you get an api server up using express. If you just get the frontend working the way you want it, then I'll help you get a server up that delivers the same data in the same format, except we will be funnelling it into a database to preserve quota. I've done it in my current apifax project I am working on, and it works. We can just go through and cherry pick the bits we need:

https://github.com/aaron-watts/apifax

Just don't commit your keys, and if you do by accident say, then delete them and create new ones so no one can steall them from you!

jjaimealeman commented 3 years ago

@aaron-watts

Yup - imma need help on this one, lol.

I tend to "not" like hopping on the bandwagon and use what everyone else uses? Like when I first heard of Bootstrap, I used UI Kit and Foundation. When everyone was using WordPress, I used ExpressionEngine and later ProcessWire (open-source PHP CMS/CMF). Now I'm using Tailwind and LOVING IT. And instead of Webpack, I played with Parcel and now Snowpack.

Have you used Koa? I'm not against Express - I just like challenging myself to think outside the box.

aaron-watts commented 3 years ago

I haven't yet. I haven't got round to learning any other frameworks yet, I only know express and the basics of flask. React is next on the list as I don't have a frontend framework under my belt yet, but even so I feel like I'd like to just polish up my JS with a few larger projects that force the scope of what I'm using out a bit more than what I'm comfortable with. If Koa isn't radically different I'm sure I could adapt to it, but if it ends up as 30 minutes with Express vs 3 days learning Koa, I'm afraid I'd have to choose Express and let you rewrite to Koa later :sweat_smile:

I will take a look though - Going from flask to express, the concept among backend frameworks seems largely coherent so it's not out of the question!