New around here? Register your SA Forums Account here!

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
HoboMan
Nov 4, 2010

Shaggar posted:

gradle is not any better than maven for tiny projects so there really is no point to it.

shaggar was right

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

hey angulords, what's the verdict of template vs reactive forms?

template seems like a more intuitive way to build it to me, but it feels like angular wants you to use reactive forms real bad

HoboMan fucked around with this message at 14:58 on May 15, 2019

HoboMan
Nov 4, 2010

pl thread is for language slapfights, this therad is for commiserating and or panicking about the terrible code we are all making GBS threads out (which is all code)

that said, shaggar is still right

HoboMan
Nov 4, 2010

how to ux? i got modals on modals right now and from using it it seems not terrible but i assume i am breaking several design laws

HoboMan
Nov 4, 2010

TheFluff posted:

i hate web modals with forms in them

our ux'ers keep adding them with the stated reason that it's important to make the user not lose track of the context. say you're in a system that handles many companies, you go look at one company, then go to a division of that company, and now you want a button that shows the user a form for adding an employee to that division. the idea with a modal would be that you can still see what you're adding the employee to, underneath the modal.

this doesn't really work well at all though imo. if you feel like you need modal forms (or especially if you have modals on modals) i think your actual problem is that you need to fix your loving navigation/breadcrumbs so it's actually readable. or you can addcontext to the page in some other way. modals are just loving terrible for this.

what they do work for are things like confirmation boxes that need to be more complex than just a simple ok/cancel (like some rarely performed destructive action that you want the user to be really sure about so you want them to type the name of the thing they're deleting for example)

form modals seems like a mistake, yes
thinking on that, the my first modal should probably be a page on it's own
i have been "updating" a circa 2000 internal tool to ~the web~ and i had just copied the old ux up to now
i care about ux, but i an't no good at it.

HoboMan
Nov 4, 2010

ok, again i have not had to design poo poo before.

how to restfully have an endpoint that returns a resource filtered by another resource?

HoboMan
Nov 4, 2010

yeah it's, as pseudorandom suggested, get all butts kissed by a given goon

HoboMan
Nov 4, 2010

i think i'm getting gaslit by my dev tools
literally cant tell what is real anymore

HoboMan
Nov 4, 2010

jufst do what i did and store all times as server system time and then store offsets from utc for every user and tjen convert to utc and then to the user's offset for every time and then also covert it back if it's user editable except where you don't because you forgot, lol

HoboMan
Nov 4, 2010

so how did every row end up with a entire nother database worth of records?

like if it's 2gb empty how many goddamn properties are in there?

HoboMan
Nov 4, 2010

i have two mat-checkboxes

one works how i want, even if the property it's bound to is undefined the property gets set to true when you check it

the other does not, the property it's bound to is always undefined no matter how much i check or uncheck it

the code between the two is mostly copy-pasted

help

HoboMan
Nov 4, 2010

ok, here's the template for the one that works
HTML code:
<mat-table class="buttsListTable" [dataSource]="butts">
      <ng-container matColumnDef="select">
        <mat-header-cell *matHeaderCellDef>
          <button mat-raised-button matTooltip="Approve butts list" [disabled]="newListButtonDisabled()" color="primary" (click)="newListButtonOnClick()">
            New List
          </button>
        </mat-header-cell>
        <mat-cell *matCellDef="let row" (click)="$event.stopPropagation()">
          <mat-checkbox [(ngModel)]="row.selected" color="primary"></mat-checkbox>
        </mat-cell>
      </ng-container>
	<ng-container matColumnDef="treeID">
        <mat-header-cell *matHeaderCellDef> Butt ID </mat-header-cell>
        <mat-cell *matCellDef="let row"> {{ row.buttID}} </mat-cell>
      </ng-container>
      <mat-header-row *matHeaderRowDef="tableColumns"></mat-header-row>
      <mat-row *matRowDef="let row; columns: tableColumns;" (click)="tableOnClick(row)"></mat-row>
</mat-table>
and the template for the one that don't
HTML code:
<mat-table class="fartsTable" [dataSource]="butt.farts">
      <ng-container matColumnDef="select">
        <mat-header-cell *matHeaderCellDef>
          <button mat-raised-button matTooltip="Remove fart"  color="primary" (click)="removeButtonOnClick()">
            Remove
          </button>
        </mat-header-cell>
        <mat-cell *matCellDef="let row">
          <mat-checkbox [(ngModel)]="row.selected" color="primary"></mat-checkbox>
        </mat-cell>
      </ng-container>
	<ng-container matColumnDef="treeID">
        <mat-header-cell *matHeaderCellDef> FartID </mat-header-cell>
        <mat-cell *matCellDef="let row"> {{ row.fartID }} </mat-cell>
      </ng-container>
      <mat-header-row *matHeaderRowDef="tableColumns"></mat-header-row>
      <mat-row *matRowDef="let row; columns: tableColumns;"></mat-row>
</mat-table>
both the butt and fart objects have a .selected property that is undefined to start with because it's not in the sever-side model
if i check some butts on the butt table and click "New List" in newListButtonOnClick() the selected property is set to true on all the butts i checked off
but on the farts table in removeButtonOnClick() all the selected properties on the farts i checked are still undefined

HoboMan
Nov 4, 2010

i figured it out, the parent component of the fartsTable component where i was testing it is a form so i had to add a name property to the checkbox for it to work right

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

Captain Foo posted:

weird metaphor for yospos, or goons in general, really

they're not using a metaphor

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