Skip to content

LG-11000 Decorated session rename#9200

Merged
theabrad merged 12 commits intomainfrom
abrad-lg-11000-session-presenter
Sep 18, 2023
Merged

LG-11000 Decorated session rename#9200
theabrad merged 12 commits intomainfrom
abrad-lg-11000-session-presenter

Conversation

@theabrad
Copy link
Contributor

@theabrad theabrad commented Sep 13, 2023

🎫 Ticket

LG-11000

🛠 Summary of changes

We looked at DecoratedSession and its two children classes SessionDecorator and ServiceProviderSessionDecorator and renamed them for clarity.

decorated_session in ApplicationController is now decorated_sp_session to emphasize that we are dealing with service provider sessions.

The DecoratedSession class is renamed to ServiceProviderSessionCreator since it is the parent class to creating decorated service provider sessions.

SessionDecorator is renamed to NullServiceProviderSession to show that it is an empty session without a service provider

ServiceProviderSessionDecorator is renamed to ServiceProviderSession

theabrad and others added 5 commits September 13, 2023 12:31
Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
We changed the naming to explicitly state that this is a sp session
changelog: Internal, Session Rename, rename decorated session and its
children to service provider names
@theabrad theabrad requested a review from a team September 13, 2023 19:14
Comment on lines 9 to -11
def call
if sp
ServiceProviderSessionDecorator.new(
Copy link
Contributor

Choose a reason for hiding this comment

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

as long as we're here, could we consider renaming this from #call to #create or maybe even #session? Makes it clearer what the result is IMO

Copy link
Contributor

Choose a reason for hiding this comment

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

That bugged me too. I went for create_session since we have so many uses of session already.

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe someday we can find a way around all the mocking that's happening in the view specs around decorated_sp_session.

@theabrad theabrad merged commit 3fb9a2c into main Sep 18, 2023
@theabrad theabrad deleted the abrad-lg-11000-session-presenter branch September 18, 2023 21:49
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.

4 participants