Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
barkbell
Apr 14, 2006

woof
I do the opposite and get myself in trouble by saying “yeah that’s definitely possible” because I’m bad at estimating timelines. Are there any good tips on improving my estimations?

Adbot
ADBOT LOVES YOU

barkbell
Apr 14, 2006

woof
I hate getting todos from designers like “give it more breathing room” or requesting that a hover state last “half as long”.

barkbell
Apr 14, 2006

woof
React is a good bet. Look at local job postings.

barkbell
Apr 14, 2006

woof
Why are they against using WordPress? A CMS seems just about perfect.

Gatsby or 11ty would be good if you can teach the secretary to write Markdown syntax or another template language. Either create your own web form to input the data into (at this point why not use WordPress or Drupal), or set up the secretary's computer directory to automatically sync with the file server that your SSG is pulling content from. Or from Google Docs.

barkbell fucked around with this message at 15:07 on May 29, 2020

barkbell
Apr 14, 2006

woof
I've got an issue displaying an embedded pdf in IE11. Due to some authentication decisions, I need to embed a pdf in my webpage from a base64 returned by our API. It works fine in all tested browsers except IE11 which returns a Adobe PDF Access Denied error. I've tried going from <object> to <embed> to <iframe> with no luck. There must be something I'm missing...

barkbell
Apr 14, 2006

woof
I think a lot of these frameworks are for prototyping or getting mvp when you don’t have a UI designer on the team.

barkbell
Apr 14, 2006

woof
I do Angular as a part of my day job but React on the side. I could see why Next.js became popular for bigger projects.

barkbell
Apr 14, 2006

woof
store the tags

barkbell
Apr 14, 2006

woof
angular is good. so is react. vue feels like something from the 00s...

barkbell
Apr 14, 2006

woof
people who like php are into vue

barkbell
Apr 14, 2006

woof
I just won a bid to create a website for a small publishing company. Static site with maybe a half dozen pages, need a non-technical-friendly admin panel to update copy/assets and make some blog posts. I was thinking about building this in Next.js + some sort of headless CMS. What one's do people enjoy working with? I was looking at strapi.io since it is FOSS.

Also where do people like to do hosting? Netlify? This company doesn't have a preexisting website at all, i get to do choose whatever pretty much.

barkbell
Apr 14, 2006

woof
Building a marketing site built in nextjs deploying to netlify. I don't really want to track assets in git, what is the normal solution for managing assets?

barkbell
Apr 14, 2006

woof

prom candy posted:

Like content images in a hard-coded website? I put them in the repo

ya i can do this now but im thinking eventually id like to move away from that

smackfu posted:

git-lfs?

this is neat

barkbell
Apr 14, 2006

woof
Is there a good tool for making sure my html document is in order? I use a combination of google's lighthouse and a front end checklist, but i didnt know if there was something better

e: btw for managing assets i went with cloudinary

barkbell
Apr 14, 2006

woof
i used tailwind for a project for a client. i liked a lot of the decisions made about sizing and spacing and such. i dont like the super long list of classes. css in js is good tho.

barkbell
Apr 14, 2006

woof
https://basarat.gitbook.io/typescript/

I like this. It covers JS stuff too

barkbell
Apr 14, 2006

woof
New job uses react. I’ve only done react on my own projects and i use next.js lately too. This is a lot different from how i develop projects though, it looks like stuff ive heard people complain about in regards to react. Components that contain no view, i got chastised for writing a hook for analytics and instead was told to rewrite it as a provider for global state. It seems absurd to me to architect something this way. Maybe ive been doing it wrong the whole time previously?

barkbell
Apr 14, 2006

woof
^ i was posting for my own sanity check

Bruegels Fuckbooks posted:

You're talking analytics like "google analytics" right, just reporting back info on what page user actually viewed in the app? That makes perfect sense as a hook because you can just call the analytics api as the path changes, not sure why you'd use provider for global state for that.

Yeah Google Analytics, it would initialize the gtag scripts and tracked page views by listening to route changes from react router. Speaking of react router all the routes are contained in some top level routes component. My first PR after starting a couple months ago contained nested routes specific to the feature i developed and it surprised everyone that you could do that. its just full of weird decisions and dare i say antipatterns.

barkbell
Apr 14, 2006

woof
not really. it seems like they shove everything into global state: the routes, screen width, etc

barkbell
Apr 14, 2006

woof
new job is angular with ngrx everywhere it sucks

barkbell
Apr 14, 2006

woof

Cugel the Clever posted:

I've got a meddlesome problem that I'd love to solve with pure CSS to avoid the need for a janky JS implementation that would have to account for page resize, but a solution eludes me. Basically, I want an image to "fill" the height of a container that gets its height from the other items in it, plus have a specific aspect ratio (1:1; 3:2; etc.)

HTML code:
<div class="container">
  <div class="item item--image">
    <img class="image" src="imageUrl" />
  </div>
  <div class="item">
    <p>Blah</p>
  </div>
</div>
If we lived in a perfect world, I could just specify height: 100% on the .item--image and .image, discarding the image's inherent dimensions and everything would just work. Unfortunately, that doesn't seem to be the world we live in and the img will only accept a height override with an explicit unit value. The only exception I've found is if the .container is display: grid, where .item--image is set to height: 100% and .image set to height: 0 to prevent its inherent sizing and min-height: 100% to take up the container's height. Of course, this doesn't work correctly in at least Firefox, so quite possibly doesn't work in any of the other circumstances. The aspect ratio could be achieved with the new aspect ratio property, but that doesn't work with our browser requirements.

The padding top/bottom trick doesn't work as it defines the height by the width, which is the opposite of what I need.

https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio

Not sure I understand exactly what you are looking for, but these properties should be helpful to you.

barkbell
Apr 14, 2006

woof
Anyone use solid.js yet? Opinions?

barkbell
Apr 14, 2006

woof
vue is for lapsed php devs

barkbell
Apr 14, 2006

woof
react has getters and setters

barkbell
Apr 14, 2006

woof
why do people love to reach for redux at the first sign of component interaction

barkbell
Apr 14, 2006

woof
I wrote angular before react, and when i switched over hooks had already been released.

I've just never been on a project where I've wanted to add it, and the projects that already had redux or any flux-like lib were a huge mess with anything and everything stuck in it.

From talking to coworkers who like redux, they are usually front-end only devs that use it to wrangle data from poorly written APIs into a form they want to use.

barkbell
Apr 14, 2006

woof

prom candy posted:

After doing some more research I still don't really understand how you're supposed to do safely data fetching in useEffect now. I guess for any heavy computation like that you need to create a ref that says "this already ran so don't run it again?" Also yeah I know I should just use a third party data fetching lib and I normally do.

I thought the idea was that's not what they wanted useEffect to be used for

e: i dunno what you are supposed to use tho

barkbell fucked around with this message at 01:26 on Jul 19, 2022

barkbell
Apr 14, 2006

woof
i really like fastify

barkbell
Apr 14, 2006

woof
Gatling. Autocannon. Artillery.

barkbell
Apr 14, 2006

woof
dont use redux its bad

barkbell
Apr 14, 2006

woof
there was a lot of hype around remix but it doesnt seem that great? i dunno

barkbell
Apr 14, 2006

woof

gbut posted:

Ok, I admit I'm not a heavy context user myself, so I'm mostly conveying information I've heard from colleagues with more experience: context is not optimized for global state and using it as-is leads to triggering re-renders on props that haven't changed, unlike scoping updates via reducer in redux. I've been avoiding it due to that little nugget of wisdom(?)

use it for low-velocity changes like your ui theme provider, your google analytics id provider, hell even user info

also, just learn react op

Adbot
ADBOT LOVES YOU

barkbell
Apr 14, 2006

woof

Chas McGill posted:

What's the state of offline web apps lately? I'd like to make something that can work offline or connected through the browser. I'm wondering if I should take the react native route to begin with, since I think the main use case will be on mobile. I'm a little reluctant to do that since I don't think messing with app stores and such is worth it for what I want to deliver, though.

https://localfirstweb.dev/

I found this site last week. Might be a useful starting point.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply