liqd / aula

An online platform for political participation in schools in Germany (not in active development)
https://liqd.net
Other
27 stars 5 forks source link

Rename `IdeaSpace`s #1008

Closed np closed 7 years ago

np commented 7 years ago

Work in progress towards #1002

np commented 7 years ago

This has only the renaming part but this can be merged.

fisx commented 7 years ago

what do you think about this change?:

@@ -477,7 +477,7 @@ newtype ClassName = ClassName { _unClassName :: ST }
 -- every school year.)
 data SchoolClass = SchoolClass
     { _classSchoolYear :: Int -- ^ e.g. 2015
-    , _className       :: ST  -- ^ e.g. "7a"
+    , _className       :: ClassName
     }
   deriving (Eq, Ord, Show, Read, Generic)
fisx commented 7 years ago

The following should morally hold, but doesn't technically:

fromList [Student (Just c), Student Nothing] === fromList [Student (Just c)]

Should we canonicalize this? Or do you think it's not an issue? (We should not use equality on role sets for authorization checks anyway, I guess.)

np commented 7 years ago

@fisx

Yes _className :: ClassName is planned. I agree that ideally this should hold but I would not bother.

fisx commented 7 years ago

@np ack to both answers, thanks.

fisx commented 7 years ago

I've played with the styling and moved a validator to module Frontend.Validation. The rest LGTM. I'll merge when travis is green.

fisx commented 7 years ago

thanks!