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
prom candy
Dec 16, 2005

Only I may dance
Thanks for all the suggestions. I think some of the issues must just be from copying my dotfiles repo that I've only ever used on Mac and probably causing poo poo not to work so I think I might blow that away and try installing windows packages like you said instead of trying to do everything in WSL land. What's your typical workflow Thermopyle? When do you use Powershell and when do you use bash?

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance
Okay cool, I'm going to give that set up a try when I have some more time to mess around with it. Thanks and sorry for hijacking the thread all weekend

prom candy
Dec 16, 2005

Only I may dance
So I ended up trying out Tailwind on a simple little app we were extracting from our main project. No idea how well it would scale on a huge product but man does it ever make building components fast. Not having to jump back and forth between CSS and markup, or come up with a name for every stupid little element that needs some styling is really nice.

prom candy
Dec 16, 2005

Only I may dance
Is Nuxt basically Next but with Vue instead of React?

prom candy
Dec 16, 2005

Only I may dance
Yeah i would definitely consider starting a new project in rails as well, I just wouldn't use Rails to render views. Active Record is a very nice ORM, and Ruby is a nice language. It's far from dead.

prom candy
Dec 16, 2005

Only I may dance
The secret to Rails is to just keep it away from your single page application. You build a REST or GraphQL server application with Rails, and then you build a SPA with a tool that's good for building a SPA. DHH/Basecamp uses Javascript in ways that are completely different from what the rest of the world is doing so it's best to just ignore their ideas on that stuff. It's still very good for back-end though imo, although there are lots of other good options now too.

prom candy
Dec 16, 2005

Only I may dance

my bony fealty posted:

do you know of any reading about how they do stuff that's different? I am very interested, we use Basecamp at work and I have always wondered about its tech. Is this Stimulus framework thing what I should start looking at?

No idea, like I said I've basically been ignoring everything they say about javascript since they released turbolinks.

prom candy
Dec 16, 2005

Only I may dance
What's your goal here? Learning for the sake of learning? Do you have a personal project or business idea you want to build? Do you want to start freelancing? Looking to get a job? There's a lot of different directions you can go in but your eventual goal should probably inform your next steps. For example if you want to freelance or work at an agency then deep diving on the Wordpress stack would probably be smart. If you want to build your own SaaS startup then you would probably want to start learning a different stack.

prom candy
Dec 16, 2005

Only I may dance
I have a mobile web app and for a long time I've had the understanding that you can't really do fixed bottom bars because iOS Safari does that annoying poo poo where it'll show/hide the status bar depending on where you're scrolling, and it just pops the status bar right on top of your content. Recently our designer discovered that Headspace has it set up so that the status bar and address bar just never disappear, and so now he wants to do the same thing for our app and I can't figure out how they're doing it. I tried copying over their meta tags but that doesn't seem to make a difference, so now I'm wondering if they're doing some kind of weird scroll jack approach or if there's another technique that I'm not aware of. There's a million questions on Stack Overflow about how to make the status bar disappear (which Apple really doesn't want you to do, understandably) but I can't find anything when I search for making it not disappear... anyone know anything about this?

prom candy
Dec 16, 2005

Only I may dance
Ah, I think you're pretty much right! Their root html element is position fixed and then everything happens inside there, and then they also have a main-content div that's flex-grow: 1 and it also is set to overflow-y: scroll. Here I was downloading their source maps and inspecting their event listeners, didn't even consider the pure CSS solution. Thanks!

prom candy
Dec 16, 2005

Only I may dance
In the past, you would write a class that extends React.Component any time you wanted to use local state in your component, or any time you want to use life cycle methods (e.g. fire off a function when your component first renders, or when it re-renders with new props.) As of React 16.8 (announced in October, released in Feb) you can use Hooks to accomplish many of these same things, but class components aren't going away.

prom candy
Dec 16, 2005

Only I may dance
Lifecycle methods are cool until you have a component that has to deal with multiple different things during the same lifecycle method, at which point they become really cluttered.

prom candy
Dec 16, 2005

Only I may dance
You can't "trust" your client-side app any more than you can trust requests from Postman or anywhere else. There are lots of different ways to Auth individual users with a set up like this, JWT in a cookie is popular, using local storage and sending a token via headers with each request is another. I would probably just use auth0 if I was starting a new project today.

prom candy
Dec 16, 2005

Only I may dance
No one should ever be able to access their own password, definitely don't store passwords in plain text.

prom candy
Dec 16, 2005

Only I may dance
Depends on if you're a developer or if you're more like a "super admin," ie someone who is very familiar with the WP ecosystem but only surface level familiar with the underlying web tech.

Although you can totally use Gatsby as a front end for WordPress and if I was still freelancing I'd probably do just that.

prom candy
Dec 16, 2005

Only I may dance

Grump posted:

You mean if the client wants a front-end change outside of posting a new blog post, they have to contact the developer? Or is there some automated build process you have?

I'm assuming the main use of using headless WP is that blog posts come back from API responses, right?

Gatsby is a static site generator so you would need to rebuild the site after each content change. The beauty of that is your site is static, no worrying about the database going down or whatever. Easiest route is to host on netlify and set up Wordpress to trigger a rebuild via webhooks when content is updated. You could also do poo poo like have it rebuild via cron task or give your client a slack command to trigger a rebuild or something.

Any Wordpress plug-ins that do theme stuff won't work with headless Wordpress.

RE sass vs postcss, my personal opinion is that CSS preprocessing is on the way out and CSS post-processing is in. I kinda live in a React/Javascript bubble though. I was extremely hot for SASS when I was building full stack Rails sites. I also think Tailwind is neat, for the reasons you mentioned. I'm usually working with a designer so pre-built UI libraries don't fly for me, any time saved is just lost when I inevitably have to fight the framework.

prom candy
Dec 16, 2005

Only I may dance
This is delightful https://www.theregister.co.uk/2019/04/23/hertz_accenture_lawsuit/

prom candy
Dec 16, 2005

Only I may dance

quote:

The Joy of Silence: Cube Farm Designs That Cut Out Conversation by Alistair Cockburn

I probably would have stayed at my last job a little longer if it wasn't for the noisy modern office.

prom candy
Dec 16, 2005

Only I may dance

Thermopyle posted:

If you really need help, you'll have to get someone thats excited on working on the project just because it's fun.

Which again is difficult if you want someone good because it's not that hard if you're experienced to find a project that's fun and also pays a regular salary.

prom candy
Dec 16, 2005

Only I may dance
Viewing from my phone, here's my initial thoughts:

- Put the phone number, address, and maybe hours higher up. That's what people are there to find most of the time
- you need a 2x version of the logo for retina screens

The real money isn't in the website design or whatever, it's in people finding this when they type "<your town> coffee shop" into google. These days you probably also want to run an insta account, a Facebook business page, a google business page, etc. If you can get a whole web strategy set up for a customer you can charge a good chunk of change, even if you're not much of a designer or coder. Your goal is to put butts in seats.

prom candy
Dec 16, 2005

Only I may dance
Sites are part of the puzzle too though, it's all about selling that complete online marketing solution.

prom candy
Dec 16, 2005

Only I may dance

The Dave posted:

For many businesses they really aren't important, it depends on the complexity of their pitch. I work with a couple of small businesses and they all get the majority of their leads through Facebook or Instagram DMs.

Take a coffee shop. Your visitors only need to know where you are, what your hours are, alluring pics of a flexible space (relaxing, ability to work from there, maybe music), and know when there's events or specials. Facebook delivers that in a better format to a more targeted audience. Then use instagram to post up all the drink/food porn.

Yeah, it's a good point. I think you can go down the website route if you do something really nice with it, like the Deli example you posted. And particularly if the business is chasing customers that have a slightly longer/more involved buying journey. But yeah for a coffee shop or whatever it's not quite as important.

Do you run business' instagram accounts for them as well? Do you come in and do photography? It seems like you need someone who's able to drip content pretty frequently for that to work, but you can always collect a ton of photos over the span of a day and then drip them out over 6 months or something. I know a lot of people who make their money with low up-front costs and then a decently high monthly cost to manage that kind of stuff.

I also charge around $100/hr but right now the vast majority of my businesses is coming from one customer that I have a big retainer with, working on a web application. Most of my smaller marketing website experience comes from when I was at an agency. We charged $150/hr.

prom candy
Dec 16, 2005

Only I may dance
You should always discuss rates and expectations up front. Is there a freelancer thread btw or is this pretty much it?

prom candy
Dec 16, 2005

Only I may dance
You can also use useReducer if you really do want to maintain a larger object of dependent state.

prom candy
Dec 16, 2005

Only I may dance
Netlify is sweeeeeet

prom candy
Dec 16, 2005

Only I may dance
Being able to do something yourself is not in itself a reason to do something yourself

prom candy
Dec 16, 2005

Only I may dance
I'm totally blanking on the right way to solve a problem here. I want to display a modal of a specified aspect ratio that fills up as much room as possible, but I also want it to be locked to the viewport so that it always fits on screen. So for example, if it was a 16:9 modal then on a 21:9 screen I would need to leave some space on the left and right, but on a 4:3 screen it would leave some space on the top and bottom.

I created a simple codesandbox to display the problem: https://codesandbox.io/s/sparkling-paper-crj5n

If you drag the browser pane so that it's wider than 16:9 you can see the issue, the box just continues to grow, whereas I'd like it to max out at 100% height. Can this be done with CSS or am I going to need to clock the window size with JS and do some calculations to get it where I want it?

edit: I think Facebook's photo modal is almost exactly what I'm trying to build, and it looks like they use JS to achieve that so maybe that's my solution

prom candy fucked around with this message at 16:17 on Aug 29, 2019

prom candy
Dec 16, 2005

Only I may dance
Oh drat, didn't even think of using vh/vw! That's a pretty nice solution, gonna see if I can get that to work for me before I go down the JS road, thanks!

prom candy
Dec 16, 2005

Only I may dance
You guys know you don't have to update your classes to function components right? I've been doing it on an as-needed basis when I want to add custom hooks to an existing class component.

prom candy
Dec 16, 2005

Only I may dance
I do like converting classes to use hooks when I do it, I like the feeling of getting to reorganize and clarify things. Converting a bunch of lifecycle methods to a single useEffect is satisfying.

Upgrading deps and dealing with API changes is a chore though.

prom candy
Dec 16, 2005

Only I may dance
Could you potentially break it into multiple effects so that you don't just have one with a lot of dependencies?

prom candy
Dec 16, 2005

Only I may dance

Nolgthorn posted:

And that's why every drat tool in the world seems like it's built to circumvent CSS. It's even built into jsx these days, just put some CSS here don't worry it'll be totally isolated, what if I don't want it to be isolated because I know what cascading means? Too bad rear end in a top hat. Get your jsx in order before I slap you upside the head.

Cascading was a mistake

prom candy
Dec 16, 2005

Only I may dance
Finding designers you like to work with goes a long way. I'm bad at designing but I love implementing nice interfaces and working with (good) designers. Working with bad designers who never give any thought to how their designs might actually come to life in the browser is worse than having no designer though.

prom candy
Dec 16, 2005

Only I may dance

oliveoil posted:

I have a really hard time taking a set of wireframes or mocks and turning it into matching html + css.

Is there any good resource for web development for a backed software engineer who wants to be able to handle frontend?

I can do backend stuff no problem but I will spend two hours of trial and error trying to do basic tasks like figure out why an anchor tag won't center in the middle of its container even though I thought I understood the flexbox cheatsheet I re-read right before starting, then spend another three hours trying random poo poo to figure out how to remove the text decoration from it and make it inherit the color of the container since the container may be in multiple states with different colors for its contents and I had no idea I needed to use the text-decoration or inherit keywords and I didn't see anything on stack overflow for that till I happened to rephrase my Google search in just the right way.

I had a big UI project late last year that resulted in me getting complaints about my slow performance from a teammate and my manager asking if I wanted to stay here and what my future plans were.

I was pretty much at the end of that UI project at the point when those complaints started coming in so I was soon able to get backend stuff and start making fast progress again, but this seems like a major weak point of mine that I don't know how to address.

I always thought I could do literally anything given time, but it seems that there's a big difference between getting something done very fast and getting something done very slow. Backend stuff, code flies from my fingertips faster than my teammates review it and I develop a backlog of stuff they have to churn through. But frontend stuff, I get similar sized changes out every 2-3 days instead of 3-5 times per day.

What do I read to get me ready to become a web dev expert? I want to get just as fast if not faster at web stuff than I am at backend stuff.

A lot of people act like implementing layouts with HTML and CSS is easy but it can be really tricky! See if you can find some screencasts of people doing exactly what you're talking about. You can pick up a lot of tips just watching how someone else tackles similar problems. Also I'm becoming a huge TailwindCSS fan, especially for rapidly building out custom designs, so here's a screencast of its creator building out a custom design with it https://www.youtube.com/watch?v=ZrRRMBaz5Z0

I like this style of video where it's a pre-recorded live stream vs. someone who's just following a script because it's good to see how someone tackles something from start to finish, including sometimes going down the wrong path.

Also post in this thread if you have specific problems, with Codepen or Codesandbox it's really easy to crowdsource your job these days :v:

prom candy fucked around with this message at 02:43 on Sep 13, 2019

prom candy
Dec 16, 2005

Only I may dance
You need to add onClick to the NavButtonProps interface

prom candy
Dec 16, 2005

Only I may dance
Ditto for stylelint although I don't really use sass anymore.

prom candy
Dec 16, 2005

Only I may dance
Try putting together a simple reproduction on CodeSandbox or CodePen. Either it'll be broken there too and someone can try to help you out or it won't be broken there and then you get to play spot the difference :v:

prom candy
Dec 16, 2005

Only I may dance
https://refactoringui.com/book/

prom candy
Dec 16, 2005

Only I may dance
I haven't bought it yet but Steve's Twitter account is full of good tips. When I was in school I read The Non-Designer's Design book which is old as hell now but also super good. Us non design types can definitely learn lots of ways to make things look better.

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance
Looks like they just got the landing page up for this too: https://tailwindui.com

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