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

Make "source file" less prominent in package development mode #1359

Closed
hadley opened this issue Sep 21, 2023 · 1 comment
Closed

Make "source file" less prominent in package development mode #1359

hadley opened this issue Sep 21, 2023 · 1 comment
Assignees
Labels

Comments

@hadley
Copy link

hadley commented Sep 21, 2023

Positron Version:

Steps to reproduce the issue:

  1. Open a package
  2. Press Cmd + Shift + Enter
  3. Current file is sourced

What did you expect to happen?

Ideally (I think), nothing, since sourcing the current file is rarely what you want when in package development mode. Should probably also remove "Source file" button from navbar.

Were there any error messages in the output or Developer Tools console?

@jennybc jennybc added this to the Public Beta 2024 Q2 milestone Feb 23, 2024
@wesm wesm added the lang: r label Feb 29, 2024
@juliasilge juliasilge self-assigned this Sep 3, 2024
juliasilge added a commit that referenced this issue Sep 4, 2024
…#4567)

Addresses #1359 

I can't think of good reasons why people would in fact want any of these
affordances in an R package. Even without them, you can still do
something like <kbd>Cmd</kbd>+<kbd>Enter</kbd> to get a function
defined, as well as of course the better/recommended options like
`devtools::load_all()`, etc.

### QA Notes

After this change,

- when you are in an `.R` file but _not_ in an R package, you get the
command to source your current file on the editor action bar, in the
context menu, and via the keybinding.
- when you _are_ in an R package in an `.R` file, you do not see this
command in any of these three spots.

I kept the command in the command palette because it is used [in
testing](https://github.com/posit-dev/positron/blob/de05c42d65938e0dfc7755d67d59eda49957ef2e/test/smoke/src/areas/positron/dataexplorer/largeDataFrame.test.ts#L99)
(the testing workspaces look like R packages) and it's not _super_
prominent for users there.
@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2024.09.0-8
OS Version          : OSX

Test scenario(s)

Cmd + Shift + Enter no longer sources current file in R package.

Link(s) to TestRail test cases run or created:
N/A

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants