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
Last Chance
Dec 31, 2004

Dabir posted:

Hi so I don't do web development in any kind of serious way but I've tinkered a little bit. Why did my friend get upset when I told him I do collapsible lists like this?
code:
<html>
	<head>
		<style>
			input.collapsible {
				display:none
			}
			div.collapsible.content {
				display:none
			}
			input.collapsible:checked + div.collapsible.content {
				display:block
			}
		</style>
	</head>
	
	<body>
		<label for="checkboxone" class="collapsible">Click me</label>
		<input type="checkbox" id="checkboxone" class="collapsible">
		<div class="collapsible content">
			Item one<br>
			Item two<br>
			Item three<br>
		</div>
	</body>
</html>

not really accessible unless you went wild with aria-roles everywhere. sort of a nonstandard way of using a form field.

probably better to use and style something like the <details> tag which has pretty wide support nowadays.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

Adbot
ADBOT LOVES YOU

Dabir
Nov 10, 2012

Oh woah that's a pretty cool tag, I'll start using that instead

Another question, is there a way to recreate the functionality of a frameset without using scripts? I've sort of inherited an oldish website, it uses the old thing of a frame on the left that's a navigation bar that open pages in a frame on the right and I know framesets aren't really supported any more. If I was going to replace that, what would I replace it with

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
You replicate it by having the navigation bar on the left on every single page of your site. You don't need any client-side scripting but you'll probably want something server-side to just include the identical HTML for the navigation bar in every page instead of you manually copying it to each file (and having to change it in every file every time you want to update it).

Dabir
Nov 10, 2012

Hmm, but this navigation bar has collapsible elements that would re-collapse fairly frequently if I did it that way.

kedo
Nov 27, 2007

Session data would allow you, with some JS or server-side scripting, maintain an open/collapsed state between pages.

The Dave
Sep 9, 2003

Dabir posted:

Hmm, but this navigation bar has collapsible elements that would re-collapse fairly frequently if I did it that way.

At face value that's not inherently bad, need to know more about the content structure of your site and what your users do.

kedo
Nov 27, 2007

Yeah.

Honestly if the site is old enough that it uses frameset, it's probably old enough that the UI sucks and could use some modernization.

Dabir
Nov 10, 2012

It's just a reference manual for an old game. The bit on the left has a couple of layers of nested collapsible lists and it would be nice if people didn't have to reopen them every time they go to a different page.

prom candy
Dec 16, 2005

Only I may dance
Do the collapsible lists correspond to what page you're currently viewing? When I used to make nav like that with purely server rendered pages it was as simple as "if the current screen is A -> 4 then show those sections opened and the rest closed"

If you really want to persist the state of the nav between navigations there are ways to do it but none of them are dead simple.

Dabir
Nov 10, 2012

There's about four or five pages, each of which covers a category of items. The first layer of the collapsibles corresponds to the pages, the second layer corresponds to items within the pages. It's a game where you build complex constructions from simple parts, so people would likely want to jump back and forth between different kinds of parts.

It's not the end of the world if I can't keep the collapsibles open. I might just leave them as they are, to be honest. What's the problem with framesets again?

go play outside Skyler
Nov 7, 2005


I am looking to setup an online shop with an advanced front-end. Basically some kind of customizer interface that will automatically add the proper items in your shopping cart.

I want to handle the front-end, because it's fun and has to be custom, but I obviously don't want to deal with the hassle of making an actual shop, like handling taxes, coupons, grouped discounts, cart, shipping, payment, shipping notifications and e-mail, chargebacks, and so on. (e: goddamn an e-shop needs to do a lot of different things when you think about it)

What is a good "developer's shop"? Something that's friendly towards devs. My experience with WooCommerce is "eh, too bloated and too customizable and wordpress". I'd love something else if it exists.

Ideally not something that is so "friendly" that they start taking in insane processing fees.

e: Found out about Stripe Checkout - looks pretty needs-suiting. What do you guys think?

go play outside Skyler fucked around with this message at 12:11 on May 19, 2023

prom candy
Dec 16, 2005

Only I may dance
I think Shopify is pretty developer friendly. They bought Remix after all.

davey4283
Aug 14, 2006
Fallen Rib
Alright guys, I decided to take the plunge. I applied to a web dev program and start on June 5th https://www.codeplatoon.org/full-stack/course-curriculum/

So far I've been using freecodecamp, codewars and eloquent javascript to prep. I'm not super confident about the job market with these tech layoffs but it is what it is.

Hit me with some words of wisdom.

Verisimilidude
Dec 20, 2006

Strike quick and hurry at him,
not caring to hit or miss.
So that you dishonor him before the judges



davey4283 posted:

Alright guys, I decided to take the plunge. I applied to a web dev program and start on June 5th https://www.codeplatoon.org/full-stack/course-curriculum/

So far I've been using freecodecamp, codewars and eloquent javascript to prep. I'm not super confident about the job market with these tech layoffs but it is what it is.

Hit me with some words of wisdom.

The hardest part will be the hiring process, but you will get a position eventually.
To make yourself stand out from other candidates with your experience level, after you're done with the program, make a nicely formatted personal website and load it up with small fun projects. Make sure they're all deployed, usable, and accessible.

You can feel free to use my website as an example: https://johnmartinez.dev/

The Dark Souls of Posters
Nov 4, 2011

Just Post, Kupo
I’ve heard good things about codeplatoon. Enjoy the boot camp. I had a lot of fun when I did it, and I even managed to get a job after and now I’ve been laid off and found a new job.

prom candy
Dec 16, 2005

Only I may dance

davey4283 posted:

Hit me with some words of wisdom.

Start building poo poo asap. The best way to learn is to just kinda get in over your head on a project.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

prom candy posted:

Start building poo poo asap. The best way to learn is to just kinda get in over your head on a project.

This this this a million times this.

If you have a project up on GitHub that works, has tests, and as a bonus, will deploy on commit (after making sure tests pass for super mega bonus) you are ahead of 90% of the people who already have jobs.

davey4283
Aug 14, 2006
Fallen Rib
Thanks for the feedback back guys. I'm pretty stoked for the program, definitely looking forward to it. I don't have a website yet but one of the volunteers from CP said you could fix up your GitHub up to look like a polished profile page as well. I guess next on the docket is to search for some projects to do in my downtime. I'm currently slammed with pre work homework and stuff.

davey4283 fucked around with this message at 14:55 on May 25, 2023

Verisimilidude
Dec 20, 2006

Strike quick and hurry at him,
not caring to hit or miss.
So that you dishonor him before the judges



davey4283 posted:

Thanks for the feedback back guys. I'm pretty stoked for the program, definitely looking forward to it. I don't have a website yet but one of the volunteers from CP said you could fix up your GitHub up to look like a polished profile page as well. I guess next on the docket is to search for some projects to do in my downtime. I'm currently slammed with pre work homework and stuff.

Yeah, you can deploy a lot of projects and sites directly from github really easily. That's how I host my projects. Paying for URLs is nice but it's ultimately unnecessary, what matters is if an interviewer or resume reviewer can play with the projects you've worked on immediately.

I've personally ignored a lot of resumes that don't have something tangible to play with, even if they have good credentials and work history. Many other interviewers do the same, so it's best to hedge your bets.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

davey4283 posted:

Hit me with some words of wisdom.

my company just told us they had to close one of our programming job recs after a week because there was 1400 applicants

so my words of advice now are you're going to have to accept the fact that you're going to have to put out 300+ applications to get a job. I think I did something like 250 to get my first dev job.

prom candy
Dec 16, 2005

Only I may dance
Every job I've ever had has been from knowing someone.

The Dave
Sep 9, 2003

Same. If I was looking and had absolutely no leads I would probably start hitting up local meetups because they’re often thinly-veiled recruiting spots.

America Inc.
Nov 22, 2013

I plan to live forever, of course, but barring that I'd settle for a couple thousand years. Even 500 would be pretty nice.
As a frontend developer, would it be useful for my career to learn how to make websites in Wordpress and other CMSes? I've been talking with a few people about improving their websites and it's always a wordpress or WIX site.

In my main job I do React and Django stuff but for freelancing those skills ironically seem to be irrelevant. I did make a proposal for a job on Upwork that would actually involve frontend work.

kedo
Nov 27, 2007

It depends on where you want your career to go.

Despite how much some developers love to hate it, WordPress is still a tremendous force on the web. It's used on 43.2% of all sites on the internet, and it shows no sign of slowing down. It has a robust ecosystem around it and there's a ton of work to be had if you're a talented WP dev. I've spent a very large chunk of my career working in WordPress, both freelance and in-house at design/dev shops, and we've never had a lack for business. WordPress work tends to fall into three broad categories – marketing site, blogs, and ecommerce sites, though there's the odd project that diverges from those groups. If you're going to work in WP, you'll be expected to be an expert with PHP, JS and S/CSS as the line between the WP frontend and backend is very blurred.

I'm biased, but if you're going to work with a CMS WordPress is your best bet. Drupal is the second runner up last I checked, but it is absolutely miserable to work with and commands a far smaller market share (anecdotally, clients who have/want sites built on Drupal tend to be assholes, I don't know why). There are various other CMSs out there that are pleasant to work with (Craft comes to mind), but the demand for them is small. I see various headless CMSs being talked about occasionally, but they are a minuscule drop in the bucket and specializing in one of those vastly reduces the number of places you'd be able to find a job. The few that I've worked with have been pleasant (KeystoneJS was fun and I have a personal project that uses it), but no clients are actively looking for devs who know obscure headless CMSs.

As a final selling point: since you already know React, WordPress might be a good CMS for you to pick up as its new content editor uses React to power its components. The number of people who can create completely custom components from scratch is very small since most WP devs aren't familiar with React (at least in my experience), and those that are are beautiful unicorns.


America Inc. posted:

In my main job I do React and Django stuff but for freelancing those skills ironically seem to be irrelevant.

By and large people looking for freelancers aren't going to know wtf React and Django are, so that's likely why they feel irrelevant. If you want to freelance with these technologies, you'd be better off courting dev shops that already use them to see if they have extra projects they can throw your way when they get overwhelmed.


America Inc. posted:

I did make a proposal for a job on Upwork that would actually involve frontend work.

Upwork is terrible. If you want to get freelance work, you are far better off telling every single person you know (literally) that you're available for freelance, and what type of work you do. Referral work yields higher quality clients and more money with very little time investment. When I first started freelancing I did this and I proceeded to have seven years of non-stop work before covid happened and a lot of project budgets dried up.

kedo fucked around with this message at 15:21 on May 30, 2023

fsif
Jul 18, 2003

Depends on the freelance opportunities. In my (likely pretty privileged) opinion, the Wix/Squarespace and to a lesser extent Wordpress jobs are a bigger pain in the rear end and don't pay as well. There's absolutely still lots of demand for React-based freelance jobs that are generally better all around, but yeah, you likely have to have an in with someone at a creative agency or tech company.

I'm more bullish on the headless CMS's as well; obviously Wordpress controls an ungodly portion of the web (though I suspect those numbers of juiced a bit by old abandoned sites and hobbyists with no intent to ever contract work from an external dev), but Contentful still commands a pretty large market share.

prom candy
Dec 16, 2005

Only I may dance
Wordpress can be used as a headless CMS as well, no?

Another potential direction you can go in is Shopify expert. Shopify bought Remix a few months ago so if you like React it might be even moderately pleasant to work with.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Headless Wordpress isn't ideal because it takes as long to return an API result as it does to render a whole dang page

fsif
Jul 18, 2003

prom candy posted:

Wordpress can be used as a headless CMS as well, no?

Definitely but my presumption is that most jobs that are explicit about needing to be on Wordpress specifically are for existing code bases that likely depend on plugins.

prom candy
Dec 16, 2005

Only I may dance

cum jabbar posted:

Headless Wordpress isn't ideal because it takes as long to return an API result as it does to render a whole dang page

Sure but mix that up with some NextJS ISR and you got a stew going

spiritual bypass
Feb 19, 2008

Grimey Drawer
Comedy option: editorial users enter content on the Wordpress backend while your own homegrown API serves results from the database

kedo
Nov 27, 2007

Headless WP makes very little sense to me because one of the biggest selling points of the platform is the ability to easily implement third party plugins, and headless prevents the majority of plugins from working.

I mean, I guess if you live the editor THAT much it maaaaaybe makes sense… sorta?

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Whenever I have to deal with printing things (i.e. reports and poo poo), I want to burn down a building.

At least I finally integrated Paged.js into my project, making my life a smidge easier. Been a fun exercise dicking around with an additional root in React and then getting it to tell me when things have been done rendering, so that I can send everything to Paged.js.

What however still annoys me is that the first page generated is just the fitting chunk of HTML, while the second page and beyond, Paged.js wraps it into a <html><body>... structure, matching the original DOM tree up to the container element with the HTML to be chunked, picking up all style attributes along the way, too. So you can't just do visibility:hidden on the container React renders into, to hide away the transition, because then all pages but the first are blank.

Combat Pretzel fucked around with this message at 23:41 on Jun 2, 2023

New Coke
Nov 28, 2009

WILL AMOUNT TO NOTHING IN LIFE.
I have a question about page translation. I'm seeing errors related to data submitted via a form in an MVC core app being too big for the database column. Was a bit confused, as these are input via a select and none of the option are that wide, but on seeing some Chinese and Cyrillic text in some users' responses I'm starting to suspect that this is because people are using page translators which are translating the select options before submitting the form, which in some cases is too big.

Is there a preferred way to resolve this? I've tried using a notranslate attribute and made sure that the value attribute of the option elements are populated, but it still seems to be an issue. I've tried to test this with a couple of browsers and I haven't been able to replicate this.

spiritual bypass
Feb 19, 2008

Grimey Drawer
It's likely a spam bot that submits every field with text regardless of the input type. Does the form use backend validation on that field? What about a CSRF token?

Sab669
Sep 24, 2009

So this is a really dumb question, I've got an Angular app that uses Bootstrap for most stuff. Using this for some tooltips in the app - https://ng-bootstrap.github.io/#/components/tooltip/api

Works flawlessly in 2 of my components, doesn't work at all in 2 other components. It's just a bunch of <input type="text" [(ngModel)]="model.someField" ngbTooltip="Whole numbers only">


Cannot figure out what might cause it to not render, can't find any real other examples of this happening on Google. No errors in my dev console when I mouse over the textboxes that aren't working.

I feel like I gotta be missing something dumb/obvious but there's nothing different in any of my .ts files, nothing stand out in the main app.module.ts or anything either.

Any ideas :confused:

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Sab669 posted:

So this is a really dumb question, I've got an Angular app that uses Bootstrap for most stuff. Using this for some tooltips in the app - https://ng-bootstrap.github.io/#/components/tooltip/api

Works flawlessly in 2 of my components, doesn't work at all in 2 other components. It's just a bunch of <input type="text" [(ngModel)]="model.someField" ngbTooltip="Whole numbers only">


Cannot figure out what might cause it to not render, can't find any real other examples of this happening on Google. No errors in my dev console when I mouse over the textboxes that aren't working.

I feel like I gotta be missing something dumb/obvious but there's nothing different in any of my .ts files, nothing stand out in the main app.module.ts or anything either.

Any ideas :confused:

Hard to debug without code, but maybe you aren't importing the directive correctly in the components where it isn't working?

Sab669
Sep 24, 2009

I'll update with some actual code later, sorry; SA is blocked at work so I was phone posting and now I have to go to a Happy Hour :( But none of the components have anything going on; there's just 1 import in the main app.module.ts then tagging that `ngbTooltip` attribute onto 45 different input controls across 4 components.

MikeJF
Dec 20, 2003




Are you importing the tooltip module into the containing module of each component?

Sab669
Sep 24, 2009

MikeJF posted:

Are you importing the tooltip module into the containing module of each component?

Incidentally I don't seem to be importing it anywhere but the app.module.ts; not in the Components where it does work nor the ones where it doesn't.

code:
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

...

@NgModule({
  declarations: [  
    ...
  ],
  imports: [
    ...
    NgbModule,
    ...
  ],
HTML / .ts from a working component-
code:
            <div class="card col-sm-2  cardbody">
                <input ngbTooltip="Numbers Only" type="text" [(ngModel)]="model.market_apartmentoccupancy_avgvacancy_market" (focus)="removePercent()" (blur)="addPercent()">
            </div> 


import { Component, Input, OnInit } from '@angular/core';
import * as ClassicEditor from '@employer-dev/ckeditor5--custom';
import { Subscription } from 'rxjs';
import { CustomUploadAdapter } from 'src/app/custom-upload-adapter';
import { ApartmentMarketModel } from 'src/app/shared/classes/ApplicationUiConfig';
import { AsrService } from 'src/app/shared/services/asr.service';
import { environment } from 'src/environments/environment';
Then one that doesn't work:
code:
        <td>
            <input ngbTooltip="Numbers Only" type="number" min="0" [(ngModel)]="propInfoModel.siteimprovements_number_buildings" />
        </td>

import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as ClassicEditor from '@employer-dev/ckeditor5--custom';
import { Subscription } from 'rxjs';
import { CustomUploadAdapter } from '../../custom-upload-adapter';
import {PropertyDetailsModel, PropertyInfoModel, PropertyInfoUtilModel, UnitMixModel } from '../../shared/classes/ApplicationUiConfig';
import { AsrService } from '../../shared/services/asr.service';
import { environment } from 'src/environments/environment';
Not sure if it's relevant to include any more of the HTML surrounding either, but I made sure to rip out the ghetto rear end Tables and replace them with divs / bootstrap columns, still misbehaves. Even if I copy paste the working one, strip out the model binding / events it doesn't appear on the other one.

Like I said, I gotta be missing something supremely dumb but I can't seem to spot it and have no ideas what to even look for. I did try adding `import { NgbModule } from '@ng-bootstrap/ng-bootstrap';` to each component of mine but that made no difference



Edit Seems like the wrong Import statement entirely, actually, should be `import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';` -- but once again how the fk is this working in some cases at all, then. And still broken elsewhere.

Sab669 fucked around with this message at 04:42 on Jun 7, 2023

Adbot
ADBOT LOVES YOU

MikeJF
Dec 20, 2003




Your app doesn't have any other modules besides app.module.ts, though? All four components are directly in app.module?

(Importing ngbModule imports all the ng bootstrap components, including the tooltip. You can import only individual ones if you want to shrink the bundle)

This probably isn't it, but I notice in the working one you haven't self-closed the input element.

MikeJF fucked around with this message at 06:25 on Jun 7, 2023

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