Skip to content

Overuse of "atSource" boolean var (and more) #827

@louisgreiner

Description

@louisgreiner

At some places in the code, we use atSource (boolean) to deal with source/target expected behaviors. However, this can lead to misunderstanding when the return type of a method should return a boolean as well.

For example:
https://github.com/OpenRailAssociation/netzgrafik-editor-frontend/blob/52e468b2149e31592cd8d2787f227a92ef248de9/src/app/view/editor-main-view/data-views/trainrunsections.view.ts#L2022-L2026C11

  private filterTimeTrainrunsectionNonStop(
    viewObject: TrainrunSectionViewObject,
    atSource: boolean,
    isArrival: boolean,
  ): boolean {

I don't know what should be done

Metadata

Metadata

Assignees

Labels

area:servicesServices, helpers, utils and i18n ("logical" stuff)area:viewActual components ("visual" stuff)code-qualityTechnical enhancements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions