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

Show the application name in the splash screen #6531 #11661

Conversation

MikeGriniezakis
Copy link
Contributor

@MikeGriniezakis MikeGriniezakis commented Nov 28, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

The Application Name setting was not taken into account when rendering the splash screen.
This PR changes the default "Arches" text to use the Application Name setting.

Issues Solved

Closes #6531

Checklist

  • I targeted one of these branches:
    • dev/8.0.x (under development): features, bugfixes not covered below
    • dev/7.6.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Ticket Background

  • Sponsored by:
  • Found by: @
  • Tested by: @
  • Designed by: @

Currently, the splash screen does not show the application name.
It shows "Arches" in all cases. This commit adds the application name to the splash screen.

Changed the nav bar to show and the carousel to show the application name.
@MikeGriniezakis MikeGriniezakis force-pushed the 6531_splash_page_application_name branch from 1f90b9e to f71e3d0 Compare December 4, 2024 08:03
@MikeGriniezakis MikeGriniezakis requested a review from a team as a code owner December 4, 2024 08:03
@MikeGriniezakis MikeGriniezakis changed the base branch from dev/7.6.x to dev/8.0.x December 4, 2024 08:04
Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this @MikeGriniezakis. It seems that the project settings aren't being used in the index view in main.py, but rather the Arches settings, so that will need to be fixed to get this working.

The template changes would also need to be made to the project template so that they are reflected in new projects. You can find that here: arches/arches/install/arches-templates/project_name/templates/index.htm.

@@ -34,6 +34,7 @@ def index(request):
"main_script": "index",
"active_page": "Home",
"app_title": settings.APP_TITLE,
"app_name": settings.APP_NAME,
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to use the project settings, but rather only the Arches settings, so this value remains 'Arches'.

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 updated the code to use the project settings when getting the APP_NAME in the commit d57bf02

Copy link
Member

Choose a reason for hiding this comment

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

Isn't "Arches" the expected value if there has not been a system settings tile saved for this setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upon running the setup_db, the value "Arches" is inserted as the default value into the Application Name setting. With my previous commit, the splash page only changes when the Application Name is changed through the settings.

from urllib.parse import urlparse

from django.conf import settings as project_settings
Copy link
Member

Choose a reason for hiding this comment

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

Actually, I don't think we should be importing settings via the standard Django import until we address the behavior difference between dev and prod fleshed out in #11660.

@@ -34,6 +34,7 @@ def index(request):
"main_script": "index",
"active_page": "Home",
"app_title": settings.APP_TITLE,
"app_name": settings.APP_NAME,
Copy link
Member

Choose a reason for hiding this comment

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

Isn't "Arches" the expected value if there has not been a system settings tile saved for this setting?

@jacobtylerwalls jacobtylerwalls removed the request for review from a team December 18, 2024 16:58
@chiatt
Copy link
Member

chiatt commented Dec 18, 2024

Hi @MikeGriniezakis - I really appreciate your work on this. Your effort has been really valuable in exposing the importance of addressing #11660 as @jacobtylerwalls has pointed out. In light of this fact, and the fact that the index page is something that generally gets overwritten during project development anyhow, I don't think we should invest more time in this, so I'm going to close this PR and issue. Again, thanks very much for your help.

@chiatt chiatt closed this Dec 18, 2024
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.

Application Name Setting does not apply to splash page
3 participants