Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2595: update domain request view only pages - [ZA] #2753

Merged
merged 15 commits into from
Sep 19, 2024

Conversation

zandercymatics
Copy link
Contributor

@zandercymatics zandercymatics commented Sep 13, 2024

Ticket

Resolves #2595

Changes

  • Changes which date(s) display on the viewonly pages for which state. For instance, withdrawn now has a Withdrawn on: date.
  • Fixes a bug with cisa representative wherein it would always show no even if one did in fact exist.
  • Fixes a bug where the domain requests header in portfolio mode would show both domains and domain requests as active
  • Adds a breadcrumb instead of a back button for these pages

Context for reviewers

**Important: ** When viewing these changes in portfolio view, make sure that the domain requests that you add a portfolio have yourself set as the creator. We have not yet implemented a viewonly view, as that is a follow-on ticket. This means that you will only see these dates on the "manage" page for now.

To see your portfolio, you will need the following:

  1. The waffle flags organization_feature and organization_requests enabled ("everyone" set to "yes)
  2. A portfolio added on multiple domain requests
  3. A new User portfolio permission record with yourself added as an admin. This can be found on that table.
  4. A started domain request that you yourself created (aka using the start a new domain request button)

Note: You can technically view our viewonly mode for started and action needed domains, but its not yet supported. To do so, you need to copy the domain request id in the url, and navigate to http://getgov-za.app.cloud.gov/domain-request/{ID}.

Setup

You will need to test the following cases:

  • The view-only page on a domain request in every status (minus approved). Ensure that the dates here match the ones on the figma stylistically. Do note that in_review and ineligible will just show Last updated on as no update was specified.
  • Add a cisa representative to a domain request in view-only mode. Ensure that the cisa rep section doesn't display no, but instead displays their name
  • Ensure that clicking the view mode of a domain request doesn't cause a header bug where it looks like you are on the domains page, and the domains request page
  • Test that the breadcrumb works correctly
  • Test that all of the above still apply when in portfolio view

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Added at least 2 developers as PR reviewers (only 1 will need to approve)
  • Messaged on Slack or in standup to notify the team that a PR is ready for review
  • Changes to “how we do things” are documented in READMEs and or onboarding guide
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Original Developer)

  • All new functions and methods are commented using plain language
  • Did dependency updates in Pipfile also get changed in requirements.txt?
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Add at least 1 designer as PR reviewer

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Reviewed this code and left comments
  • Checked that all code is adequately covered by tests
  • Made it clear which comments need to be addressed before this work is merged
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Code reviewer)

  • All new functions and methods are commented using plain language
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values
  • (Rarely needed) Did dependency updates in Pipfile also get changed in requirements.txt?

Validated user-facing changes as a developer

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing

  • Checked keyboard navigability

  • Meets all designs and user flows provided by design/product

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links
  • Tried to break the intended flow

Validated user-facing changes as a designer

  • Checked keyboard navigability

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Screenshots

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.



@register.filter(name="is_domain_request_subpage")
def is_domain_request_subpage(path):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dave-kennedy-ecs / @rachidatecs Just for your awareness, I had to add this logic to fix the headers. They weren't displaying correctly on many subpages. I've include this for portfolio and domains.

The easier solution here would have been to check a url like domain-requests/{some url} though I don't think we current follow that scheme

Copy link

🥳 Successfully deployed to developer sandbox za.

@zandercymatics zandercymatics changed the title (Draft) 2595 update domain request view only pages Issue #2595: update domain request view only pages - [ZA] Sep 16, 2024
Copy link

🥳 Successfully deployed to developer sandbox za.

@zandercymatics zandercymatics changed the title Issue #2595: update domain request view only pages - [ZA] (DRAFT) Issue #2595: update domain request view only pages - [ZA] Sep 17, 2024
Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

@erinysong erinysong self-assigned this Sep 17, 2024
Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

@zandercymatics zandercymatics changed the title (DRAFT) Issue #2595: update domain request view only pages - [ZA] Issue #2595: update domain request view only pages - [ZA] Sep 17, 2024
Copy link

🥳 Successfully deployed to developer sandbox za.

@erinysong
Copy link
Contributor

Is the Created by field still within the scope of this ticket? I'm testing the different view only pages and noticed that they aren't displaying so wanted to check in case ACs changed from the ticket discussion thread earlier
image

@erinysong
Copy link
Contributor

erinysong commented Sep 18, 2024

Results of the view only page on all domain statuses. Everything seems to display as expected aside from the missing Created by field as mentioned above

Started
image

Submitted
image

Rejected
image

Withdrawn - Not sure what case the view only page for this would be visible but wanted to note that the view-only page for Withdrawn domains gives the option to click the Withdraw button -- is this expected behavior?
image

Action Needed
image

@erinysong
Copy link
Contributor

erinysong commented Sep 18, 2024

Verified CISA rep name displays correctly. Domain Requests view only page also no longer includes bug where both Domains and Domain Requests tab are active. Breadcrumb also looks good and works as expected
image

image

Copy link

🥳 Successfully deployed to developer sandbox za.

@AnnaGingle AnnaGingle requested review from AnnaGingle and removed request for a team and Katherine-Osos September 19, 2024 15:02
Copy link

@AnnaGingle AnnaGingle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

@zandercymatics
Copy link
Contributor Author

zandercymatics commented Sep 19, 2024

@erinysong

Is the Created by field still within the scope of this ticket? I'm testing the different view only pages and noticed that they aren't displaying so wanted to check in case ACs changed from the ticket discussion thread earlier

I asked the same thing! The answer is no (per @abroddrick) - that is actually handled in this follow on ticket. The same goes for any other content changes

Not sure what case the view only page for this would be visible but wanted to note that the view-only page for Withdrawn domains gives the option to click the Withdraw button -- is this expected behavior?

Yeah I noticed that too. That will be handled in the follow-on as it touches on some content changes given design OKs it.
Its a bug with the current implementation because I think its only checking if its not in "rejected" (or something like that - going from memory)

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link
Contributor

@erinysong erinysong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that things work on the UI and left some minor clarifying/planning questions! Everything else looks good and I can approve afterwards!

{% comment %}
These are intentionally seperated this way.
There is some code repetition, but it gives us more flexibility rather than a dense reduction.
Leave it this way until we've solidified our requirements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if there ended up being any requirements set or any tickets to set these requirements on the way we display status and if we yes, if we should reference them here!

Copy link
Contributor Author

@zandercymatics zandercymatics Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tickets in particular that I am aware of! That is a good callout though and I'm glad you thought of that.

These pages are still undergoing design review + we are fleshing out the org feature. Personally, I think these dates may shift around - or we may decide to add some more in the future. That was my thinking, at least

"""Checks if the given page is a subpage of domains.
Takes a path name, like '/domains/'."""
# Since our pages aren't unified under a common path, we need this approach for now.
url_names = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this is necessary to address in this PR, but I imagine this may get bigger as we introduce pages/subpages so should we consider a ticket to revisit this and refactor our paths in a way that's easier to recognize a page's more meta traits? @abroddrick

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree 100% with doing a refactor on our urls - and I share your concern about this list growing. Do you mind branching this off into a slack thread?

I'm in favor of a refactor ticket on these as you mentioned!

def is_portfolio_subpage(path):
"""Checks if the given page is a subpage of portfolio.
Takes a path name, like '/organization/'."""
# Since our pages aren't unified under a common path, we need this approach for now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the above comment that it may be worth revisiting how we organize our URL paths if we're adding more nested pages in the future

notes = models.TextField(
null=True,
blank=True,
)

def get_first_status_set_date(self, status):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, would we expect any cases where we'd want to get the date a request was first given a certain status aside from started?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for scripts or some info for django admin, but I'm not really concrete on it. I left this function around in case we need it, but honestly if you think it'd be more clear to just consolidate these I am totally OK with that too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't have a strong opinion so I'm happy to go with whatever data from audit logs you think would be useful in the future!

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link
Contributor

@erinysong erinysong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you for answering clarifying questions! One nonblocking suggestion to consolidate the first started getter if you think there's no likely use cases for getting the first time a certain status was set, but will leave that to your discretion!

@zandercymatics zandercymatics merged commit 3495101 into main Sep 19, 2024
10 checks passed
@zandercymatics zandercymatics deleted the za/2595-update-domain-request-view-only-pages branch September 19, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Domain Request view only pages
3 participants