-
Notifications
You must be signed in to change notification settings - Fork 95
feat: add NcFormBoxButton #7779
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7779 +/- ##
=======================================
Coverage 51.57% 51.57%
=======================================
Files 96 96
Lines 3143 3143
Branches 864 864
=======================================
Hits 1621 1621
Misses 1274 1274
Partials 248 248 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4031646 to
4b56a86
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new folder structure? Why not put it inside components/NcFormBox/ like we do with some other shared components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it clear that it is not a public API and prevent "I forgot to exclude from the docs" situations.
But it is an internal thing, so we can refactor the structure any moment later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything Public API/design/implementation related?
Since this is the only one comment in the review, I don't know, if it is the full review or you submitted with this comment only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything Public API/design/implementation related?
No otherwise its fine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it clear that it is not a public API
But only what is exported from the index.ts is public API.
IMHO having a new folder structure is more confusing than helpful.
and prevent "I forgot to exclude from the docs" situations.
True but thats due to non-explicitly defined styleguidist config but also not hard to add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I would prefer moving it in this PR back to the normal location /src/components/NcFormBox/NcFormBoxItem.vue and do a follow up where we e.g. move all internal components and composables to consistent new locations. So we can just continue this one without mixing build related changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
components/NAME/NAME.vue
Even if we call components/NAME/NAME.vue public, it doesn't specify the position for the private component, does it? Works if it is a subcomponent of a specific public one, but what if it is shared?
components/Foo/Foo.vue-> uses ->Shared.vuecomponents/Bar/Bar.vue-> uses ->Shared.vue
Ok, Foo.vue and Bar.vue are public. Where Shared.vue is supposed to be?
If in Foo - why not Bar. If in Bar - why not Foo.
every other vue file in that folder is private
The following components are "every other" and they are public:
components/NcRichContenteditable/NcMentionBubble.vuecomponents/NcRichContenteditable/NcAutoCompleteResult.vue
So:
- No, not only such paths are
public - No, having such paths doesn't specify the path for
privateeven if p.1 were actual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also its not really matter as a developer if the component is public or not, because you can use both.
It does matter a lot. In a private component I can do everything, rewrite it, rename, change the interface, throw it away. In a public component I need to be careful and not break anything. It is easy to change it and hard to bring back after being released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a completely different folder
I also proposed 2 alternative names for the folder and 1 alternative location.
Again, I'm fine with a different location, folder name or both.
I'm not fine with just mixing public with private files together and only separate by including/excluding in re-export and the list on the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@susnux I pushed a commit moving the component to the components/NcFormBox/NcFormBoxItem.vue. I don't think this is the best place for it, but it can be discussed later, outside the NcFormBoxButton PR.
GVodyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works, and code looks good!
I wanted to mention though that it would be nice to have the "copy" action to be implemented inside of the component, seeing as in the current state it would require every app to create their own implementation. Seeing as this is time-critical though, I think it's totally fine to do that in another PR later.
|
@GVodyanov NcFormBoxCopyButton is in local draft, but will be pushed later since it has lower priority over base components |
Antreesy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good
|
@susnux Since your comment is not marked as blocking, review is not on |
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
f77a4d4 to
8f194c1
Compare
|
Rebased onto main and squashed, no other changes. |
|
/backport to stable8 |
|
/backport to stable8 |
|
The backport to # Switch to the target branch and update it
git checkout stable8
git pull origin stable8
# Create the new backport branch
git checkout -b backport/7779/stable8
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 8f194c14
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/7779/stable8Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud-libraries:backport/7779/stable8."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
☑️ Resolves
Described in the docs.
🖼️ Screenshots
🏁 Checklist
stable8for maintained Vue 2 version or not applicable