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

Remove demo code #3538

Merged
merged 11 commits into from
Apr 17, 2024
Merged

Remove demo code #3538

merged 11 commits into from
Apr 17, 2024

Conversation

mathemancer
Copy link
Contributor

Fixes #3531

This PR removes all Demo code which is otherwise unused from Mathesar.

Technical details

Some demo code was used for example datasets in other context, and so was moved to a different location rather than removed entirely.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@kgodey
Copy link
Contributor

kgodey commented Apr 15, 2024

I assume we want to wait until the April release branch is cut (cc @ghislaineguerin) before we merge this.

@mathemancer
Copy link
Contributor Author

I assume we want to wait until the April release branch is cut (cc @ghislaineguerin) before we merge this.

Definitely.

@pavish Any opinions on whether we should remove the demo-mode-related translations? I know we paid for them, but we can always recover them through git or other means when/if we want them back.

@pavish
Copy link
Member

pavish commented Apr 16, 2024

@mathemancer

Any opinions on whether we should remove the demo-mode-related translations? I know we paid for them, but we can always recover them through git or other means when/if we want them back.

Yes, we should remove any key we're no longer using. We can always recover them if needed, Transifex also has a memory feature for previously translated strings, apart from git.

@kgodey
Copy link
Contributor

kgodey commented Apr 16, 2024

Agreed that paying for the translations isn't a reason to keep them around if we no longer need them.

@mathemancer mathemancer marked this pull request as ready for review April 16, 2024 23:51
@mathemancer mathemancer requested review from Anish9901 and pavish April 16, 2024 23:51
@mathemancer
Copy link
Contributor Author

Okay, this is now ready for review. From @pavish , I'm just requesting a quick check to make sure there aren't any obvious problems where the front end might break because it expects something (e.g., a flag or variable) to be available from the back end.

@ghislaineguerin
Copy link
Contributor

@kgodey @mathemancer I have cut the release 2 days ago.

@pavish pavish added the pr-status: review A PR awaiting review label Apr 17, 2024
Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

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

@mathemancer The code changes look good to me. I have a couple comments.

Dockerfile Show resolved Hide resolved
Comment on lines -115 to -149
{% if live_demo_mode %}
<div class="unsupported-device">
<div class="warning-icon">⚠️</div>
<p class="title">{% translate "Unsupported Screen Size" %}</p>
<p>
{% translate "Mathesar is a spreadsheet-like application with a rich UI that does not yet function well on screens this small. Improved support for mobile devices is on our" %}

<a href="https://mathesar.org/roadmap.html" target="_blank">
{% translate "roadmap" %}
</a>.
</p>
<p>
{% translate "You can still use this demo site, but some features may not work correctly. We encourage you to try Mathesar on a device with a larger screen." %}
</p>
</div>
<div class="tutorial align-center">
<div class="header">
<strong>{% translate "Live Demo Mode" %}</strong>
</div>
<div class="body">
{% translate "Mathesar's live demo is available to anyone to try out." %}

{% if live_demo_username and live_demo_password %}
{% translate "Use the following credentials to login" %}:
<ul>
<li>{% translate "Username" %}: <strong>{{live_demo_username}}</strong></li>
<li>{% translate "Password" %}: <strong>{{live_demo_password}}</strong></li>
</ul>
{% endif %}

{% translate "Keep in mind that the data in the live demo is reset regularly." %}
</div>
</div>
{% endif %}

Copy link
Member

Choose a reason for hiding this comment

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

We would have to figure out a different way to mention that the demo data is reset regularly to users accessing the demo site. Do we have an approach figured out on how to do that?

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 don't have an approach figured out yet. I figure let's get everything out for now, and then only add things back into the service if absolutely needed later. Couldn't we have a custom front page served by the demo microservice? It could pull the needed assets from the "real service". Not sure, though.

Copy link
Member

Choose a reason for hiding this comment

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

I think having a custom front page should be fine.

However, we currently show a banner on the app while someone is viewing the demo. This PR removes that banner as well. I'm cool with removing it and adding it later based on requirements. I do think this needs to be tracked in a separate issue.

@pavish pavish removed their assignment Apr 17, 2024
@mathemancer mathemancer requested a review from pavish April 17, 2024 09:28
@mathemancer
Copy link
Contributor Author

@pavish I made the requested change.

Copy link
Member

@Anish9901 Anish9901 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@Anish9901 Anish9901 enabled auto-merge April 17, 2024 10:42
@Anish9901 Anish9901 disabled auto-merge April 17, 2024 10:43
@Anish9901
Copy link
Member

Waiting on your re-review @pavish, please merge this if you don't have any more concerns.

Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

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

@mathemancer Thanks, looks great!

We will have to create an issue to track this: #3538 (comment)

@pavish pavish added this pull request to the merge queue Apr 17, 2024
Merged via the queue into develop with commit 266a12f Apr 17, 2024
36 checks passed
@pavish pavish deleted the remove_demo_code branch April 17, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove demo code
6 participants