% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={Refactor: is this Node visible},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{Refactor: is this Node visible}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{refactor-is-this-node-visible}{%
\section{Refactor: is this Node
visible}\label{refactor-is-this-node-visible}}

The logic to determine whether a \texttt{Node} is displayed or visible
is scattered in both the model and the template.

We should refactor this logic into a function or a method (maybe on the
\texttt{Namespace} class). This change should make it easier to reason
if or how to present a \texttt{Node} given the current \texttt{User}
while supporting \texttt{Namespace} options to control behavior.

List of things that can effect how a \texttt{Node} is presented:

\begin{itemize}
\tightlist
\item
  is the node \texttt{disabled}? (a disabled node should be set as a
  placeholder)
\item
  is the node \texttt{verified}? (by default a \texttt{Namespace} will
  display unverified \texttt{Nodes})
\item
  is the node \texttt{approved}? (this matters if the \texttt{Namespace}
  owner wants to approve all comments)
\item
  is the user a moderator / owner of the \texttt{Namespace}?
\item
  was the node flagged as spam by a moderator / owner of the
  \texttt{Namespace}?
\item
  was the node flagged as spam by an end user?
\end{itemize}

By default a \texttt{Namespace} will display a \texttt{Node} regardless
of the state of its \texttt{verified} or \texttt{approved} attributes: A
\texttt{Namespace} owner may set any of the following to True:

\begin{itemize}
\tightlist
\item
  \texttt{hide\_until\_approved}
\item
  \texttt{hide\_unverified}
\end{itemize}

This changes the behavior to hide nodes by default.

\end{document}
