ActiveRecord already implements this at the model level and also makes
use of the ActiveRecord schema cache. `Database.table_available?` did
not use this query cache and ended up sending *all* of those queries to
Postgres every single time.
* Install foreman for procfile and setup appdomain for csrf in gitpod
Foreman was not installed (so bin/startup would fail fast).
Additionally, the APP_DOMAIN can be fetched from the `gp` utility to
get the url for port 3000
Since the .env file is read top down - it's easier to implement
appending the corrected value than to replace it at the beginning, but
I'm completely open to redoing this via a sed command or similar to
change the variable at the top (this would be less confusing for
anyone else dealing with the file).
* Ensure command executes as a series of commands
TODO: if this works move the echo commands into the setup section
* move .env setup commands to init section
* remove duplicate header, convert heading to h1
* hide decorative image from sr, convert nav to a nav
* minor fix for items in nav list
* minor fixes to the podcast page
* trigger CI checks
* Add counts for number of views when showing referrers
We're sampling unauthenticated page views (every 10th visit is
recorded) and using the "counts_for_number_of_views" attribute to mark
the 10x weight of these sampled events.
The referrers section of the statistics page however was counting the
number of page view rows (without regard to the weight) and it looked
like external referrers (like a google search) were counting 10 times
on the statistics page.
Update the analytics service to show the sum of the weights, rather
than the count of events, on the "Traffic Source Summary" of the
article stats page.
This is loaded from /api/analytics/referrers?article_id=:id on the
front end.
Needs a test that demonstrates this (currently all specs for this
stayed green suggesting the coverage didn't include anything that
represents this situation).
* Avoid calling sum twice by reusing the value alias
the .sum(:column) method in this chain creates an alias 'select
sum(column) as sum_column' which can be used here to avoid
recalculating the sum once for sorting and again for return value.
Sort by the return value's alias.
* Update the test to include weighted page views
Since we want to demonstrate that the count shown for visits matches
the sum of the weighted page views, add weighting to the top url
visits and expect the sum of the weights to be presented.
* This does not work
* Revert "This does not work"
This reverts commit b2292e61fb10faa6051b009214e732a9927c7746.
* Tried with a partial, works
* Improved with component
* chore: add my name to the chaore so that I can search after cleanup
* feat: update the forem creator signup template and copy over some stuff from the email_resgistration
* feat: update the fields
* feat: make sure that it saves
* feat: add an eye svg to the password input
* feat: update eye and eye-off svg
* feat: update the placeholder for the password field
* reveak and hide the password when clicking on the icon
* eye visiblibility functionality
* feat: display the username
* feat: show the username row when we click edit
* feat: update the interaction design
* chore: remove extra line
* chore: remove unneeded function
* feat: never show the username hint when the user field is not hidden
* feat: ensure that the username works
* chore: update the existing specs
* feat: move to packs
* refactor: manage the visibility with a avariable and not with the password type
* optimize the way we use password visibility
* chore: validate the username field
* chore: update the statement
* feat: add a background
* feat: accessibility changes
* feat: set a max length on the username
* feat: some more accessibility changes
* feat: validate the length of the password
* chore: add some margin to the error box
* feat: by_email shows the error states and we should cater for the Forem Creator
* feat: tackle any errors
* WIP/test: first pass of some integration specs
* feat: update the Cypress tests
* Update app/views/shared/authentication/_forem_creator_signup.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/shared/authentication/_forem_creator_signup.html.erb
Co-authored-by: Michael Kohl <me@citizen428.net>
* chore: temporarily disable the background on large screens
* chore: remove title
* prevent default
* feat; update the style of the button
* feat: update the tests to use accessibility tags
* feat: update icons
* chore: oops
* little forntend updates
* Update app/views/shared/authentication/_forem_creator_signup.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update cypress/integration/creatorOnboardingFlows/creatorSignup.spec.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* fea: change the aria label and pressed
* feat: change to just John
* feat: update cypress tests
* test if this is causing the test to fail
* feat: add some margin
* feat: mostly for Cypress - required is true or false based on whether the field is needed
* refactor: use the password label and skip last test
* Update app/views/shared/authentication/_forem_creator_signup.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/views/shared/authentication/_forem_creator_signup.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* fix: do not toggle the label (accessibility)
* fix: add a comma
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>