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

component: Improve duplication of components #11079

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ParthS007
Copy link
Member

@ParthS007 ParthS007 commented Feb 22, 2024

Proposed changes

closes #10896

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have tested that my improvement is effective and works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.
Screenshot 2024-05-10 at 11 13 14

@ParthS007 ParthS007 changed the title component: add licence, agreement and commit _message info component: Improve duplication of components Feb 22, 2024
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.74%. Comparing base (6aee586) to head (57bf259).
Report is 353 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11079      +/-   ##
==========================================
- Coverage   90.82%   90.74%   -0.08%     
==========================================
  Files         554      559       +5     
  Lines       57306    57618     +312     
  Branches     9122     9200      +78     
==========================================
+ Hits        52046    52285     +239     
- Misses       3640     3696      +56     
- Partials     1620     1637      +17     
Files Coverage Δ
weblate/trans/views/create.py 88.95% <ø> (ø)

... and 58 files with indirect coverage changes

Copy link

This pull request has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Apr 11, 2024
@github-actions github-actions bot closed this Apr 25, 2024
@ParthS007 ParthS007 reopened this Apr 29, 2024
@github-actions github-actions bot removed the wontfix Nobody will work on this. label Apr 30, 2024
@ParthS007 ParthS007 marked this pull request as ready for review May 10, 2024 09:25
@ParthS007 ParthS007 requested a review from nijel May 16, 2024 10:00
@@ -96,6 +96,7 @@
<li><a href="{% url 'manage-access' project=object.project.slug %}">{% trans "Users" %}</a></li>
{% endif %}
{% if user_can_edit_component %}
<li><a href="{% url 'create-component' %}#existing">{% trans "Duplicate Component" %}</li>
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect the current component to be selected when clicking on the link here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, To have initial value for component field in get_form, where I can set initial of form in fetch_params from the request?

form.fields['component'].initial = form.initial.get('component')

weblate/trans/views/create.py Show resolved Hide resolved
delete_message=component.delete_message,
merge_message=component.merge_message,
addon_message=component.addon_message,
pull_message=component.pull_message,
Copy link
Member

Choose a reason for hiding this comment

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

While you include these in the URL, there is nothing to process these (ComponentCreateForm doesn't accept these). The additional fields either should be hidden inputs in the create form, or it should have tabs/folding for the additional parameters.

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.

Issues when duplicating a component
2 participants